#include "sarmal.h"

#include <string.h>

/* define byte swap */
#if defined(__GNUC__) && defined(__linux__)
#  include <byteswap.h>
#  define BSWAP(x) (x)=bswap_64((x)) 
#elif defined(_MSC_VER) && _MSC_VER >= 1300
#  include <stdlib.h>
#  define BSWAP(x) (x)=_byteswap_uint64((x))
#else /* better than nothing */
#  define BSWAP(x) \
        (x) = (((x)&0xFF00FF00FF00FF00ull)>>8)|(((x)&0x00FF00FF00FF00FFull)<<8); \
        (x) = (((x)&0xFFFF0000FFFF0000ull)>>16)|(((x)&0x0000FFFF0000FFFFull)<<16); \
	(x) = ((x)>>32)|((x)<<32)
#endif /* BSWAP */

/* get byte macro */
#define GET_BYTE(x,y) (unsigned char)((x)>>(8*(y)))

/* g function macro */
#define	g(in,out)	\
	out =	SMDS[256*0+GET_BYTE(in,7)] ^	\
		SMDS[256*1+GET_BYTE(in,6)] ^	\
		SMDS[256*2+GET_BYTE(in,5)] ^	\
		SMDS[256*3+GET_BYTE(in,4)] ^	\
		SMDS[256*4+GET_BYTE(in,3)] ^	\
		SMDS[256*5+GET_BYTE(in,2)] ^	\
		SMDS[256*6+GET_BYTE(in,1)] ^	\
		SMDS[256*7+GET_BYTE(in,0)]

/* G function macro */
#define	G(x0,x1,x2,x3,x4,x5,x6,x7,A,B,C,D) \
	x0 ^= A;	\
	x4 ^= C;	\
	g(x0, t0);	\
	g(x4, t1);	\
	x2 ^= B;	\
	x6 ^= D;	\
	x1 ^= t0;	\
	x2 += t0;	\
	x3 -= t0;	\
	x5 ^= t1;	\
	x6 += t1;	\
	x7 -= t1

/* look-up tables [ s-box look-up + multiplication with MDS matrix in GF(2^8) ] */
Bit64 SMDS[2048] = {

	/* LT0 */
	0x3A3AD2F79CF7CD9Cull, 0x5B5B2AB9C7B9E2C7ull, 0xF2F21D311631C316ull, 0x0F0F337722777822ull, 
	0xE4E4539762977362ull, 0xADAD23ACC9AC01C9ull, 0x29298D7CF67C55F6ull, 0x9191EF6D416DFC41ull, 
	0xC5C5F6A3A4A366A4ull, 0x474746458F45028Full, 0xB8B86211B711A9B7ull, 0x6363F25C575C3F57ull, 
	0x8C8C86980F98140Full, 0x1010509060908060ull, 0xDEDE8160FE60BEFEull, 0x7676B3E129E19729ull, 
	0x2C2C9C51E8517DE8ull, 0x7575BCFA23FA8F23ull, 0x898997B511B53C11ull, 0x40405D7A9D7A3A9Dull, 
	0xA3A315D2EDD271EDull, 0xE1E142BA7CBA5B7Cull, 0x3232FABFACBF8DACull, 0x6D6DC42273224F73ull, 
	0xBBBB6D0ABD0AB1BDull, 0x0E0E367E247E7024ull, 0xC6C6F9B8AEB87EAEull, 0x9494FE405F40D45Full, 
	0xFAFA357926798326ull, 0xDFDF8469F869B6F8ull, 0x17174BAF72AFB872ull, 0x585825A2CDA2FACDull, 
	0x6161F84E5B4E2F5Bull, 0xD0D0B71EDA1ECEDAull, 0xA4A40EEDFFED49FFull, 0xB5B55B749974C199ull, 
	0x8282B0E62BE6642Bull, 0xFCFC2B4F324FB332ull, 0x9393E57F4D7FEC4Dull, 0x2A2A8267FC674DFCull, 
	0x4F4F6E0DBF0D42BFull, 0xC8C8CFC68AC60E8Aull, 0x07071B3F123F3812ull, 0x3939DDEC96ECD596ull, 
	0xEDED7ED654D63B54ull, 0x7B7B8A840784FF07ull, 0x565613DCE9DC8AE9ull, 0x1E1E66EE44EEF044ull, 
	0xE7E75C8C688C6B68ull, 0x4444495E855E1A85ull, 0x9090EA644764F447ull, 0x797980960B96EF0Bull, 
	0x3B3BD7FE9AFEC59Aull, 0x2626BE0BD40B2DD4ull, 0xAFAF29BEC5BE11C5ull, 0xF8F83F6B2A6B932Aull, 
	0xD3D3B805D005D6D0ull, 0x5A5A2FB0C1B0EAC1ull, 0x1111559966998866ull, 0x8585ABD939D95C39ull, 
	0x6E6ECB3979395779ull, 0xB2B2404B8B4BF98Bull, 0xCCCCDBE292E22E92ull, 0x0D0D39652E65682Eull, 
	0x45454C5783571283ull, 0xECEC7BDF52DF3352ull, 0x16164EA674A6B074ull, 0x2121A534C63415C6ull, 
	0x5E5E3B94D994CAD9ull, 0x7070ADD73DD7A73Dull, 0x0808284830484030ull, 0xBFBF792EA52E91A5ull, 
	0x6A6ADF1D611D7761ull, 0x3333FFB6AAB685AAull, 0x9999C7257125BC71ull, 0xC7C7FCB1A8B176A8ull, 
	0xDBDB904DE04D96E0ull, 0xFDFD2E463446BB34ull, 0x8484AED03FD0543Full, 0xA2A210DBEBDB79EBull, 
	0xF6F609150E15E30Eull, 0xB9B96718B118A1B1ull, 0x3535E180BE80B5BEull, 0xD4D4A33AC23AEEC2ull, 
	0x9F9FD91365138C65ull, 0x6767E6784F781F4Full, 0x8B8B9DA71DA72C1Dull, 0xEEEE71CD5ECD235Eull, 
	0x7272A7C531C5B731ull, 0x1D1D69F54EF5E84Eull, 0x5C5C3186D586DAD5ull, 0xA0A01AC9E7C969E7ull, 
	0x28288875F0755DF0ull, 0x4343526197612297ull, 0x0101050906090806ull, 0xCACAC5D486D41E86ull, 
	0xD9D99A5FEC5F86ECull, 0x6666E37149711749ull, 0x0C0C3C6C286C6028ull, 0xF7F70C1C081CEB08ull, 
	0xCDCDDEEB94EB2694ull, 0xB4B45E7D9F7DC99Full, 0x1A1A72CA5CCAD05Cull, 0x7373A2CC37CCBF37ull, 
	0xE8E86FFB4AFB134Aull, 0x8F8F898305830C05ull, 0xA5A50BE4F9E441F9ull, 0x515108E3FBE3B2FBull, 
	0x4242576891682A91ull, 0x2E2E9643E4436DE4ull, 0x3030F0ADA0AD9DA0ull, 0x9B9BCD377D37AC7Dull, 
	0x9D9DD30169019C69ull, 0x1F1F63E742E7F842ull, 0xE3E348A870A84B70ull, 0xCBCBC0DD80DD1680ull, 
	0xF9F93A622C629B2Cull, 0x8A8A98AE1BAE241Bull, 0x6464E96345630745ull, 0x3C3CCCC188C1FD88ull, 
	0x0000000000000000ull, 0xB6B6546F936FD993ull, 0x4E4E6B04B9044AB9ull, 0x2222AA2FCC2F0DCCull, 
	0xA1A11FC0E1C061E1ull, 0x55551CC7E3C792E3ull, 0x7878859F0D9FE70Dull, 0xD7D7AC21C821F6C8ull, 
	0x12125A826C82906Cull, 0x9898C22C772CB477ull, 0x4A4A7F20A1206AA1ull, 0x8E8E8C8A038A0403ull, 
	0xB1B14F508150E181ull, 0xC3C3E895B09556B0ull, 0xDCDC8B72F272AEF2ull, 0x545419CEE5CE9AE5ull, 
	0xA6A604FFF3FF59F3ull, 0xF0F017231A23D31Aull, 0xEBEB60E040E00B40ull, 0x7D7D94B213B2CF13ull, 
	0x09092D4136414836ull, 0x3737EB92B292A5B2ull, 0x2F2F934AE24A65E2ull, 0x6565EC6A436A0F43ull, 
	0x888892BC17BC3417ull, 0xC2C2ED9CB69C5EB6ull, 0x2B2B876EFA6E45FAull, 0x13135F8B6A8B986Aull, 
	0x6060FD475D47275Dull, 0x9E9EDC1A631A8463ull, 0xF5F5060E040EFB04ull, 0xA7A701F6F5F651F5ull, 
	0x595920ABCBABF2CBull, 0xD1D1B217DC17C6DCull, 0x7A7A8F8D018DF701ull, 0xEFEF74C458C42B58ull, 
	0x3636EE9BB49BADB4ull, 0x0404142418242018ull, 0x4D4D641FB31F52B3ull, 0xBCBC7635AF3589AFull, 
	0x535302F1F7F1A2F7ull, 0x3E3EC6D384D3ED84ull, 0xBDBD733CA93C81A9ull, 0xA8A83281D78129D7ull, 
	0x4C4C6116B5165AB5ull, 0x02020A120C12100Cull, 0x7171A8DE3BDEAF3Bull, 0x19197DD156D1C856ull, 
	0x8787A1CB35CB4C35ull, 0xE5E5569E649E7B64ull, 0xFFFF24543854AB38ull, 0xDADA9544E6449EE6ull, 
	0xC4C4F3AAA2AA6EA2ull, 0x9696F4525352C453ull, 0x6B6BDA1467147F67ull, 0x2020A03DC03D1DC0ull, 
	0x7474B9F325F38725ull, 0x2727BB02D20225D2ull, 0xC1C1E287BC8746BCull, 0xE6E659856E85636Eull, 
	0x0A0A225A3C5A503Cull, 0x4949703BAB3B72ABull, 0x5D5D348FD38FD2D3ull, 0xD2D2BD0CD60CDED6ull, 
	0xFEFE215D3E5DA33Eull, 0xABAB3D9ADD9A31DDull, 0x8080BAF427F47427ull, 0x1C1C6CFC48FCE048ull, 
	0xB3B345428D42F18Dull, 0x6868D50F6D0F676Dull, 0x9595FB495949DC59ull, 0x3F3FC3DA82DAE582ull, 
	0xCFCFD4F998F93698ull, 0x8D8D839109911C09ull, 0x7E7E9BA919A9D719ull, 0x9A9AC83E7B3EA47Bull, 
	0xD6D6A928CE28FECEull, 0x1B1B77C35AC3D85Aull, 0xB7B751669566D195ull, 0x0505112D1E2D281Eull, 
	0x3131F5A4A6A495A6ull, 0x6969D0066B066F6Bull, 0x2323AF26CA2605CAull, 0x48487532AD327AADull, 
	0x50500DEAFDEABAFDull, 0xACAC26A5CFA509CFull, 0xE2E24DA176A14376ull, 0xF4F403070207F302ull, 
	0xAEAE2CB7C3B719C3ull, 0x03030F1B0A1B180Aull, 0x6F6FCE307F305F7Full, 0x525207F8F1F8AAF1ull, 
	0x2525B110DE1035DEull, 0x3838D8E590E5DD90ull, 0xE0E047B37AB3537Aull, 0x8686A4C233C24433ull, 
	0x141444B478B4A078ull, 0x7C7C91BB15BBC715ull, 0xDDDD8E7BF47BA6F4ull, 0xFBFB307020708B20ull, 
	0x9797F15B555BCC55ull, 0xC9C9CACF8CCF068Cull, 0xBABA6803BB03B9BBull, 0x414158739B73329Bull, 
	0xB0B04A598759E987ull, 0xF1F1122A1C2ADB1Cull, 0x575716D5EFD582EFull, 0x6C6CC12B752B4775ull, 
	0x181878D850D8C050ull, 0xD5D5A633C433E6C4ull, 0xCECED1F09EF03E9Eull, 0x4B4B7A29A72962A7ull, 
	0x2D2D9958EE5875EEull, 0x9292E0764B76E44Bull, 0x3434E489B889BDB8ull, 0x06061E3614363014ull, 
	0x7F7F9EA01FA0DF1Full, 0xEAEA65E946E90346ull, 0xA9A93788D18821D1ull, 0x8383B5EF2DEF6C2Dull, 
	0x0B0B27533A53583Aull, 0xAAAA3893DB9339DBull, 0xD8D89F56EA568EEAull, 0x3D3DC9C88EC8F58Eull, 
	0x7777B6E82FE89F2Full, 0x5F5F3E9DDF9DC2DFull, 0x4646434C894C0A89ull, 0xC0C0E78EBA8E4EBAull, 
	0x9C9CD6086F08946Full, 0x2424B419D8193DD8ull, 0x6262F75551553751ull, 0xBEBE7C27A32799A3ull, 
	0x151541BD7EBDA87Eull, 0x8181BFFD21FD7C21ull, 0xF3F318381038CB10ull, 0xE9E96AF24CF21B4Cull, 

	/* LT1 */
	0x9C3A3AD2F79CF7CDull, 0xC75B5B2AB9C7B9E2ull, 0x16F2F21D311631C3ull, 0x220F0F3377227778ull, 
	0x62E4E45397629773ull, 0xC9ADAD23ACC9AC01ull, 0xF629298D7CF67C55ull, 0x419191EF6D416DFCull, 
	0xA4C5C5F6A3A4A366ull, 0x8F474746458F4502ull, 0xB7B8B86211B711A9ull, 0x576363F25C575C3Full, 
	0x0F8C8C86980F9814ull, 0x6010105090609080ull, 0xFEDEDE8160FE60BEull, 0x297676B3E129E197ull, 
	0xE82C2C9C51E8517Dull, 0x237575BCFA23FA8Full, 0x11898997B511B53Cull, 0x9D40405D7A9D7A3Aull, 
	0xEDA3A315D2EDD271ull, 0x7CE1E142BA7CBA5Bull, 0xAC3232FABFACBF8Dull, 0x736D6DC42273224Full, 
	0xBDBBBB6D0ABD0AB1ull, 0x240E0E367E247E70ull, 0xAEC6C6F9B8AEB87Eull, 0x5F9494FE405F40D4ull, 
	0x26FAFA3579267983ull, 0xF8DFDF8469F869B6ull, 0x7217174BAF72AFB8ull, 0xCD585825A2CDA2FAull, 
	0x5B6161F84E5B4E2Full, 0xDAD0D0B71EDA1ECEull, 0xFFA4A40EEDFFED49ull, 0x99B5B55B749974C1ull, 
	0x2B8282B0E62BE664ull, 0x32FCFC2B4F324FB3ull, 0x4D9393E57F4D7FECull, 0xFC2A2A8267FC674Dull, 
	0xBF4F4F6E0DBF0D42ull, 0x8AC8C8CFC68AC60Eull, 0x1207071B3F123F38ull, 0x963939DDEC96ECD5ull, 
	0x54EDED7ED654D63Bull, 0x077B7B8A840784FFull, 0xE9565613DCE9DC8Aull, 0x441E1E66EE44EEF0ull, 
	0x68E7E75C8C688C6Bull, 0x854444495E855E1Aull, 0x479090EA644764F4ull, 0x0B797980960B96EFull, 
	0x9A3B3BD7FE9AFEC5ull, 0xD42626BE0BD40B2Dull, 0xC5AFAF29BEC5BE11ull, 0x2AF8F83F6B2A6B93ull, 
	0xD0D3D3B805D005D6ull, 0xC15A5A2FB0C1B0EAull, 0x6611115599669988ull, 0x398585ABD939D95Cull, 
	0x796E6ECB39793957ull, 0x8BB2B2404B8B4BF9ull, 0x92CCCCDBE292E22Eull, 0x2E0D0D39652E6568ull, 
	0x8345454C57835712ull, 0x52ECEC7BDF52DF33ull, 0x7416164EA674A6B0ull, 0xC62121A534C63415ull, 
	0xD95E5E3B94D994CAull, 0x3D7070ADD73DD7A7ull, 0x3008082848304840ull, 0xA5BFBF792EA52E91ull, 
	0x616A6ADF1D611D77ull, 0xAA3333FFB6AAB685ull, 0x719999C7257125BCull, 0xA8C7C7FCB1A8B176ull, 
	0xE0DBDB904DE04D96ull, 0x34FDFD2E463446BBull, 0x3F8484AED03FD054ull, 0xEBA2A210DBEBDB79ull, 
	0x0EF6F609150E15E3ull, 0xB1B9B96718B118A1ull, 0xBE3535E180BE80B5ull, 0xC2D4D4A33AC23AEEull, 
	0x659F9FD91365138Cull, 0x4F6767E6784F781Full, 0x1D8B8B9DA71DA72Cull, 0x5EEEEE71CD5ECD23ull, 
	0x317272A7C531C5B7ull, 0x4E1D1D69F54EF5E8ull, 0xD55C5C3186D586DAull, 0xE7A0A01AC9E7C969ull, 
	0xF028288875F0755Dull, 0x9743435261976122ull, 0x0601010509060908ull, 0x86CACAC5D486D41Eull, 
	0xECD9D99A5FEC5F86ull, 0x496666E371497117ull, 0x280C0C3C6C286C60ull, 0x08F7F70C1C081CEBull, 
	0x94CDCDDEEB94EB26ull, 0x9FB4B45E7D9F7DC9ull, 0x5C1A1A72CA5CCAD0ull, 0x377373A2CC37CCBFull, 
	0x4AE8E86FFB4AFB13ull, 0x058F8F898305830Cull, 0xF9A5A50BE4F9E441ull, 0xFB515108E3FBE3B2ull, 
	0x914242576891682Aull, 0xE42E2E9643E4436Dull, 0xA03030F0ADA0AD9Dull, 0x7D9B9BCD377D37ACull, 
	0x699D9DD30169019Cull, 0x421F1F63E742E7F8ull, 0x70E3E348A870A84Bull, 0x80CBCBC0DD80DD16ull, 
	0x2CF9F93A622C629Bull, 0x1B8A8A98AE1BAE24ull, 0x456464E963456307ull, 0x883C3CCCC188C1FDull, 
	0x0000000000000000ull, 0x93B6B6546F936FD9ull, 0xB94E4E6B04B9044Aull, 0xCC2222AA2FCC2F0Dull, 
	0xE1A1A11FC0E1C061ull, 0xE355551CC7E3C792ull, 0x0D7878859F0D9FE7ull, 0xC8D7D7AC21C821F6ull, 
	0x6C12125A826C8290ull, 0x779898C22C772CB4ull, 0xA14A4A7F20A1206Aull, 0x038E8E8C8A038A04ull, 
	0x81B1B14F508150E1ull, 0xB0C3C3E895B09556ull, 0xF2DCDC8B72F272AEull, 0xE5545419CEE5CE9Aull, 
	0xF3A6A604FFF3FF59ull, 0x1AF0F017231A23D3ull, 0x40EBEB60E040E00Bull, 0x137D7D94B213B2CFull, 
	0x3609092D41364148ull, 0xB23737EB92B292A5ull, 0xE22F2F934AE24A65ull, 0x436565EC6A436A0Full, 
	0x17888892BC17BC34ull, 0xB6C2C2ED9CB69C5Eull, 0xFA2B2B876EFA6E45ull, 0x6A13135F8B6A8B98ull, 
	0x5D6060FD475D4727ull, 0x639E9EDC1A631A84ull, 0x04F5F5060E040EFBull, 0xF5A7A701F6F5F651ull, 
	0xCB595920ABCBABF2ull, 0xDCD1D1B217DC17C6ull, 0x017A7A8F8D018DF7ull, 0x58EFEF74C458C42Bull, 
	0xB43636EE9BB49BADull, 0x1804041424182420ull, 0xB34D4D641FB31F52ull, 0xAFBCBC7635AF3589ull, 
	0xF7535302F1F7F1A2ull, 0x843E3EC6D384D3EDull, 0xA9BDBD733CA93C81ull, 0xD7A8A83281D78129ull, 
	0xB54C4C6116B5165Aull, 0x0C02020A120C1210ull, 0x3B7171A8DE3BDEAFull, 0x5619197DD156D1C8ull, 
	0x358787A1CB35CB4Cull, 0x64E5E5569E649E7Bull, 0x38FFFF24543854ABull, 0xE6DADA9544E6449Eull, 
	0xA2C4C4F3AAA2AA6Eull, 0x539696F4525352C4ull, 0x676B6BDA1467147Full, 0xC02020A03DC03D1Dull, 
	0x257474B9F325F387ull, 0xD22727BB02D20225ull, 0xBCC1C1E287BC8746ull, 0x6EE6E659856E8563ull, 
	0x3C0A0A225A3C5A50ull, 0xAB4949703BAB3B72ull, 0xD35D5D348FD38FD2ull, 0xD6D2D2BD0CD60CDEull, 
	0x3EFEFE215D3E5DA3ull, 0xDDABAB3D9ADD9A31ull, 0x278080BAF427F474ull, 0x481C1C6CFC48FCE0ull, 
	0x8DB3B345428D42F1ull, 0x6D6868D50F6D0F67ull, 0x599595FB495949DCull, 0x823F3FC3DA82DAE5ull, 
	0x98CFCFD4F998F936ull, 0x098D8D839109911Cull, 0x197E7E9BA919A9D7ull, 0x7B9A9AC83E7B3EA4ull, 
	0xCED6D6A928CE28FEull, 0x5A1B1B77C35AC3D8ull, 0x95B7B751669566D1ull, 0x1E0505112D1E2D28ull, 
	0xA63131F5A4A6A495ull, 0x6B6969D0066B066Full, 0xCA2323AF26CA2605ull, 0xAD48487532AD327Aull, 
	0xFD50500DEAFDEABAull, 0xCFACAC26A5CFA509ull, 0x76E2E24DA176A143ull, 0x02F4F403070207F3ull, 
	0xC3AEAE2CB7C3B719ull, 0x0A03030F1B0A1B18ull, 0x7F6F6FCE307F305Full, 0xF1525207F8F1F8AAull, 
	0xDE2525B110DE1035ull, 0x903838D8E590E5DDull, 0x7AE0E047B37AB353ull, 0x338686A4C233C244ull, 
	0x78141444B478B4A0ull, 0x157C7C91BB15BBC7ull, 0xF4DDDD8E7BF47BA6ull, 0x20FBFB307020708Bull, 
	0x559797F15B555BCCull, 0x8CC9C9CACF8CCF06ull, 0xBBBABA6803BB03B9ull, 0x9B414158739B7332ull, 
	0x87B0B04A598759E9ull, 0x1CF1F1122A1C2ADBull, 0xEF575716D5EFD582ull, 0x756C6CC12B752B47ull, 
	0x50181878D850D8C0ull, 0xC4D5D5A633C433E6ull, 0x9ECECED1F09EF03Eull, 0xA74B4B7A29A72962ull, 
	0xEE2D2D9958EE5875ull, 0x4B9292E0764B76E4ull, 0xB83434E489B889BDull, 0x1406061E36143630ull, 
	0x1F7F7F9EA01FA0DFull, 0x46EAEA65E946E903ull, 0xD1A9A93788D18821ull, 0x2D8383B5EF2DEF6Cull, 
	0x3A0B0B27533A5358ull, 0xDBAAAA3893DB9339ull, 0xEAD8D89F56EA568Eull, 0x8E3D3DC9C88EC8F5ull, 
	0x2F7777B6E82FE89Full, 0xDF5F5F3E9DDF9DC2ull, 0x894646434C894C0Aull, 0xBAC0C0E78EBA8E4Eull, 
	0x6F9C9CD6086F0894ull, 0xD82424B419D8193Dull, 0x516262F755515537ull, 0xA3BEBE7C27A32799ull, 
	0x7E151541BD7EBDA8ull, 0x218181BFFD21FD7Cull, 0x10F3F318381038CBull, 0x4CE9E96AF24CF21Bull, 

	/* LT2 */
	0xCD9C3A3AD2F79CF7ull, 0xE2C75B5B2AB9C7B9ull, 0xC316F2F21D311631ull, 0x78220F0F33772277ull, 
	0x7362E4E453976297ull, 0x01C9ADAD23ACC9ACull, 0x55F629298D7CF67Cull, 0xFC419191EF6D416Dull, 
	0x66A4C5C5F6A3A4A3ull, 0x028F474746458F45ull, 0xA9B7B8B86211B711ull, 0x3F576363F25C575Cull, 
	0x140F8C8C86980F98ull, 0x8060101050906090ull, 0xBEFEDEDE8160FE60ull, 0x97297676B3E129E1ull, 
	0x7DE82C2C9C51E851ull, 0x8F237575BCFA23FAull, 0x3C11898997B511B5ull, 0x3A9D40405D7A9D7Aull, 
	0x71EDA3A315D2EDD2ull, 0x5B7CE1E142BA7CBAull, 0x8DAC3232FABFACBFull, 0x4F736D6DC4227322ull, 
	0xB1BDBBBB6D0ABD0Aull, 0x70240E0E367E247Eull, 0x7EAEC6C6F9B8AEB8ull, 0xD45F9494FE405F40ull, 
	0x8326FAFA35792679ull, 0xB6F8DFDF8469F869ull, 0xB87217174BAF72AFull, 0xFACD585825A2CDA2ull, 
	0x2F5B6161F84E5B4Eull, 0xCEDAD0D0B71EDA1Eull, 0x49FFA4A40EEDFFEDull, 0xC199B5B55B749974ull, 
	0x642B8282B0E62BE6ull, 0xB332FCFC2B4F324Full, 0xEC4D9393E57F4D7Full, 0x4DFC2A2A8267FC67ull, 
	0x42BF4F4F6E0DBF0Dull, 0x0E8AC8C8CFC68AC6ull, 0x381207071B3F123Full, 0xD5963939DDEC96ECull, 
	0x3B54EDED7ED654D6ull, 0xFF077B7B8A840784ull, 0x8AE9565613DCE9DCull, 0xF0441E1E66EE44EEull, 
	0x6B68E7E75C8C688Cull, 0x1A854444495E855Eull, 0xF4479090EA644764ull, 0xEF0B797980960B96ull, 
	0xC59A3B3BD7FE9AFEull, 0x2DD42626BE0BD40Bull, 0x11C5AFAF29BEC5BEull, 0x932AF8F83F6B2A6Bull, 
	0xD6D0D3D3B805D005ull, 0xEAC15A5A2FB0C1B0ull, 0x8866111155996699ull, 0x5C398585ABD939D9ull, 
	0x57796E6ECB397939ull, 0xF98BB2B2404B8B4Bull, 0x2E92CCCCDBE292E2ull, 0x682E0D0D39652E65ull, 
	0x128345454C578357ull, 0x3352ECEC7BDF52DFull, 0xB07416164EA674A6ull, 0x15C62121A534C634ull, 
	0xCAD95E5E3B94D994ull, 0xA73D7070ADD73DD7ull, 0x4030080828483048ull, 0x91A5BFBF792EA52Eull, 
	0x77616A6ADF1D611Dull, 0x85AA3333FFB6AAB6ull, 0xBC719999C7257125ull, 0x76A8C7C7FCB1A8B1ull, 
	0x96E0DBDB904DE04Dull, 0xBB34FDFD2E463446ull, 0x543F8484AED03FD0ull, 0x79EBA2A210DBEBDBull, 
	0xE30EF6F609150E15ull, 0xA1B1B9B96718B118ull, 0xB5BE3535E180BE80ull, 0xEEC2D4D4A33AC23Aull, 
	0x8C659F9FD9136513ull, 0x1F4F6767E6784F78ull, 0x2C1D8B8B9DA71DA7ull, 0x235EEEEE71CD5ECDull, 
	0xB7317272A7C531C5ull, 0xE84E1D1D69F54EF5ull, 0xDAD55C5C3186D586ull, 0x69E7A0A01AC9E7C9ull, 
	0x5DF028288875F075ull, 0x2297434352619761ull, 0x0806010105090609ull, 0x1E86CACAC5D486D4ull, 
	0x86ECD9D99A5FEC5Full, 0x17496666E3714971ull, 0x60280C0C3C6C286Cull, 0xEB08F7F70C1C081Cull, 
	0x2694CDCDDEEB94EBull, 0xC99FB4B45E7D9F7Dull, 0xD05C1A1A72CA5CCAull, 0xBF377373A2CC37CCull, 
	0x134AE8E86FFB4AFBull, 0x0C058F8F89830583ull, 0x41F9A5A50BE4F9E4ull, 0xB2FB515108E3FBE3ull, 
	0x2A91424257689168ull, 0x6DE42E2E9643E443ull, 0x9DA03030F0ADA0ADull, 0xAC7D9B9BCD377D37ull, 
	0x9C699D9DD3016901ull, 0xF8421F1F63E742E7ull, 0x4B70E3E348A870A8ull, 0x1680CBCBC0DD80DDull, 
	0x9B2CF9F93A622C62ull, 0x241B8A8A98AE1BAEull, 0x07456464E9634563ull, 0xFD883C3CCCC188C1ull, 
	0x0000000000000000ull, 0xD993B6B6546F936Full, 0x4AB94E4E6B04B904ull, 0x0DCC2222AA2FCC2Full, 
	0x61E1A1A11FC0E1C0ull, 0x92E355551CC7E3C7ull, 0xE70D7878859F0D9Full, 0xF6C8D7D7AC21C821ull, 
	0x906C12125A826C82ull, 0xB4779898C22C772Cull, 0x6AA14A4A7F20A120ull, 0x04038E8E8C8A038Aull, 
	0xE181B1B14F508150ull, 0x56B0C3C3E895B095ull, 0xAEF2DCDC8B72F272ull, 0x9AE5545419CEE5CEull, 
	0x59F3A6A604FFF3FFull, 0xD31AF0F017231A23ull, 0x0B40EBEB60E040E0ull, 0xCF137D7D94B213B2ull, 
	0x483609092D413641ull, 0xA5B23737EB92B292ull, 0x65E22F2F934AE24Aull, 0x0F436565EC6A436Aull, 
	0x3417888892BC17BCull, 0x5EB6C2C2ED9CB69Cull, 0x45FA2B2B876EFA6Eull, 0x986A13135F8B6A8Bull, 
	0x275D6060FD475D47ull, 0x84639E9EDC1A631Aull, 0xFB04F5F5060E040Eull, 0x51F5A7A701F6F5F6ull, 
	0xF2CB595920ABCBABull, 0xC6DCD1D1B217DC17ull, 0xF7017A7A8F8D018Dull, 0x2B58EFEF74C458C4ull, 
	0xADB43636EE9BB49Bull, 0x2018040414241824ull, 0x52B34D4D641FB31Full, 0x89AFBCBC7635AF35ull, 
	0xA2F7535302F1F7F1ull, 0xED843E3EC6D384D3ull, 0x81A9BDBD733CA93Cull, 0x29D7A8A83281D781ull, 
	0x5AB54C4C6116B516ull, 0x100C02020A120C12ull, 0xAF3B7171A8DE3BDEull, 0xC85619197DD156D1ull, 
	0x4C358787A1CB35CBull, 0x7B64E5E5569E649Eull, 0xAB38FFFF24543854ull, 0x9EE6DADA9544E644ull, 
	0x6EA2C4C4F3AAA2AAull, 0xC4539696F4525352ull, 0x7F676B6BDA146714ull, 0x1DC02020A03DC03Dull, 
	0x87257474B9F325F3ull, 0x25D22727BB02D202ull, 0x46BCC1C1E287BC87ull, 0x636EE6E659856E85ull, 
	0x503C0A0A225A3C5Aull, 0x72AB4949703BAB3Bull, 0xD2D35D5D348FD38Full, 0xDED6D2D2BD0CD60Cull, 
	0xA33EFEFE215D3E5Dull, 0x31DDABAB3D9ADD9Aull, 0x74278080BAF427F4ull, 0xE0481C1C6CFC48FCull, 
	0xF18DB3B345428D42ull, 0x676D6868D50F6D0Full, 0xDC599595FB495949ull, 0xE5823F3FC3DA82DAull, 
	0x3698CFCFD4F998F9ull, 0x1C098D8D83910991ull, 0xD7197E7E9BA919A9ull, 0xA47B9A9AC83E7B3Eull, 
	0xFECED6D6A928CE28ull, 0xD85A1B1B77C35AC3ull, 0xD195B7B751669566ull, 0x281E0505112D1E2Dull, 
	0x95A63131F5A4A6A4ull, 0x6F6B6969D0066B06ull, 0x05CA2323AF26CA26ull, 0x7AAD48487532AD32ull, 
	0xBAFD50500DEAFDEAull, 0x09CFACAC26A5CFA5ull, 0x4376E2E24DA176A1ull, 0xF302F4F403070207ull, 
	0x19C3AEAE2CB7C3B7ull, 0x180A03030F1B0A1Bull, 0x5F7F6F6FCE307F30ull, 0xAAF1525207F8F1F8ull, 
	0x35DE2525B110DE10ull, 0xDD903838D8E590E5ull, 0x537AE0E047B37AB3ull, 0x44338686A4C233C2ull, 
	0xA078141444B478B4ull, 0xC7157C7C91BB15BBull, 0xA6F4DDDD8E7BF47Bull, 0x8B20FBFB30702070ull, 
	0xCC559797F15B555Bull, 0x068CC9C9CACF8CCFull, 0xB9BBBABA6803BB03ull, 0x329B414158739B73ull, 
	0xE987B0B04A598759ull, 0xDB1CF1F1122A1C2Aull, 0x82EF575716D5EFD5ull, 0x47756C6CC12B752Bull, 
	0xC050181878D850D8ull, 0xE6C4D5D5A633C433ull, 0x3E9ECECED1F09EF0ull, 0x62A74B4B7A29A729ull, 
	0x75EE2D2D9958EE58ull, 0xE44B9292E0764B76ull, 0xBDB83434E489B889ull, 0x301406061E361436ull, 
	0xDF1F7F7F9EA01FA0ull, 0x0346EAEA65E946E9ull, 0x21D1A9A93788D188ull, 0x6C2D8383B5EF2DEFull, 
	0x583A0B0B27533A53ull, 0x39DBAAAA3893DB93ull, 0x8EEAD8D89F56EA56ull, 0xF58E3D3DC9C88EC8ull, 
	0x9F2F7777B6E82FE8ull, 0xC2DF5F5F3E9DDF9Dull, 0x0A894646434C894Cull, 0x4EBAC0C0E78EBA8Eull, 
	0x946F9C9CD6086F08ull, 0x3DD82424B419D819ull, 0x37516262F7555155ull, 0x99A3BEBE7C27A327ull, 
	0xA87E151541BD7EBDull, 0x7C218181BFFD21FDull, 0xCB10F3F318381038ull, 0x1B4CE9E96AF24CF2ull, 

	/* LT3 */
	0xF7CD9C3A3AD2F79Cull, 0xB9E2C75B5B2AB9C7ull, 0x31C316F2F21D3116ull, 0x7778220F0F337722ull, 
	0x977362E4E4539762ull, 0xAC01C9ADAD23ACC9ull, 0x7C55F629298D7CF6ull, 0x6DFC419191EF6D41ull, 
	0xA366A4C5C5F6A3A4ull, 0x45028F474746458Full, 0x11A9B7B8B86211B7ull, 0x5C3F576363F25C57ull, 
	0x98140F8C8C86980Full, 0x9080601010509060ull, 0x60BEFEDEDE8160FEull, 0xE197297676B3E129ull, 
	0x517DE82C2C9C51E8ull, 0xFA8F237575BCFA23ull, 0xB53C11898997B511ull, 0x7A3A9D40405D7A9Dull, 
	0xD271EDA3A315D2EDull, 0xBA5B7CE1E142BA7Cull, 0xBF8DAC3232FABFACull, 0x224F736D6DC42273ull, 
	0x0AB1BDBBBB6D0ABDull, 0x7E70240E0E367E24ull, 0xB87EAEC6C6F9B8AEull, 0x40D45F9494FE405Full, 
	0x798326FAFA357926ull, 0x69B6F8DFDF8469F8ull, 0xAFB87217174BAF72ull, 0xA2FACD585825A2CDull, 
	0x4E2F5B6161F84E5Bull, 0x1ECEDAD0D0B71EDAull, 0xED49FFA4A40EEDFFull, 0x74C199B5B55B7499ull, 
	0xE6642B8282B0E62Bull, 0x4FB332FCFC2B4F32ull, 0x7FEC4D9393E57F4Dull, 0x674DFC2A2A8267FCull, 
	0x0D42BF4F4F6E0DBFull, 0xC60E8AC8C8CFC68Aull, 0x3F381207071B3F12ull, 0xECD5963939DDEC96ull, 
	0xD63B54EDED7ED654ull, 0x84FF077B7B8A8407ull, 0xDC8AE9565613DCE9ull, 0xEEF0441E1E66EE44ull, 
	0x8C6B68E7E75C8C68ull, 0x5E1A854444495E85ull, 0x64F4479090EA6447ull, 0x96EF0B797980960Bull, 
	0xFEC59A3B3BD7FE9Aull, 0x0B2DD42626BE0BD4ull, 0xBE11C5AFAF29BEC5ull, 0x6B932AF8F83F6B2Aull, 
	0x05D6D0D3D3B805D0ull, 0xB0EAC15A5A2FB0C1ull, 0x9988661111559966ull, 0xD95C398585ABD939ull, 
	0x3957796E6ECB3979ull, 0x4BF98BB2B2404B8Bull, 0xE22E92CCCCDBE292ull, 0x65682E0D0D39652Eull, 
	0x57128345454C5783ull, 0xDF3352ECEC7BDF52ull, 0xA6B07416164EA674ull, 0x3415C62121A534C6ull, 
	0x94CAD95E5E3B94D9ull, 0xD7A73D7070ADD73Dull, 0x4840300808284830ull, 0x2E91A5BFBF792EA5ull, 
	0x1D77616A6ADF1D61ull, 0xB685AA3333FFB6AAull, 0x25BC719999C72571ull, 0xB176A8C7C7FCB1A8ull, 
	0x4D96E0DBDB904DE0ull, 0x46BB34FDFD2E4634ull, 0xD0543F8484AED03Full, 0xDB79EBA2A210DBEBull, 
	0x15E30EF6F609150Eull, 0x18A1B1B9B96718B1ull, 0x80B5BE3535E180BEull, 0x3AEEC2D4D4A33AC2ull, 
	0x138C659F9FD91365ull, 0x781F4F6767E6784Full, 0xA72C1D8B8B9DA71Dull, 0xCD235EEEEE71CD5Eull, 
	0xC5B7317272A7C531ull, 0xF5E84E1D1D69F54Eull, 0x86DAD55C5C3186D5ull, 0xC969E7A0A01AC9E7ull, 
	0x755DF028288875F0ull, 0x6122974343526197ull, 0x0908060101050906ull, 0xD41E86CACAC5D486ull, 
	0x5F86ECD9D99A5FECull, 0x7117496666E37149ull, 0x6C60280C0C3C6C28ull, 0x1CEB08F7F70C1C08ull, 
	0xEB2694CDCDDEEB94ull, 0x7DC99FB4B45E7D9Full, 0xCAD05C1A1A72CA5Cull, 0xCCBF377373A2CC37ull, 
	0xFB134AE8E86FFB4Aull, 0x830C058F8F898305ull, 0xE441F9A5A50BE4F9ull, 0xE3B2FB515108E3FBull, 
	0x682A914242576891ull, 0x436DE42E2E9643E4ull, 0xAD9DA03030F0ADA0ull, 0x37AC7D9B9BCD377Dull, 
	0x019C699D9DD30169ull, 0xE7F8421F1F63E742ull, 0xA84B70E3E348A870ull, 0xDD1680CBCBC0DD80ull, 
	0x629B2CF9F93A622Cull, 0xAE241B8A8A98AE1Bull, 0x6307456464E96345ull, 0xC1FD883C3CCCC188ull, 
	0x0000000000000000ull, 0x6FD993B6B6546F93ull, 0x044AB94E4E6B04B9ull, 0x2F0DCC2222AA2FCCull, 
	0xC061E1A1A11FC0E1ull, 0xC792E355551CC7E3ull, 0x9FE70D7878859F0Dull, 0x21F6C8D7D7AC21C8ull, 
	0x82906C12125A826Cull, 0x2CB4779898C22C77ull, 0x206AA14A4A7F20A1ull, 0x8A04038E8E8C8A03ull, 
	0x50E181B1B14F5081ull, 0x9556B0C3C3E895B0ull, 0x72AEF2DCDC8B72F2ull, 0xCE9AE5545419CEE5ull, 
	0xFF59F3A6A604FFF3ull, 0x23D31AF0F017231Aull, 0xE00B40EBEB60E040ull, 0xB2CF137D7D94B213ull, 
	0x41483609092D4136ull, 0x92A5B23737EB92B2ull, 0x4A65E22F2F934AE2ull, 0x6A0F436565EC6A43ull, 
	0xBC3417888892BC17ull, 0x9C5EB6C2C2ED9CB6ull, 0x6E45FA2B2B876EFAull, 0x8B986A13135F8B6Aull, 
	0x47275D6060FD475Dull, 0x1A84639E9EDC1A63ull, 0x0EFB04F5F5060E04ull, 0xF651F5A7A701F6F5ull, 
	0xABF2CB595920ABCBull, 0x17C6DCD1D1B217DCull, 0x8DF7017A7A8F8D01ull, 0xC42B58EFEF74C458ull, 
	0x9BADB43636EE9BB4ull, 0x2420180404142418ull, 0x1F52B34D4D641FB3ull, 0x3589AFBCBC7635AFull, 
	0xF1A2F7535302F1F7ull, 0xD3ED843E3EC6D384ull, 0x3C81A9BDBD733CA9ull, 0x8129D7A8A83281D7ull, 
	0x165AB54C4C6116B5ull, 0x12100C02020A120Cull, 0xDEAF3B7171A8DE3Bull, 0xD1C85619197DD156ull, 
	0xCB4C358787A1CB35ull, 0x9E7B64E5E5569E64ull, 0x54AB38FFFF245438ull, 0x449EE6DADA9544E6ull, 
	0xAA6EA2C4C4F3AAA2ull, 0x52C4539696F45253ull, 0x147F676B6BDA1467ull, 0x3D1DC02020A03DC0ull, 
	0xF387257474B9F325ull, 0x0225D22727BB02D2ull, 0x8746BCC1C1E287BCull, 0x85636EE6E659856Eull, 
	0x5A503C0A0A225A3Cull, 0x3B72AB4949703BABull, 0x8FD2D35D5D348FD3ull, 0x0CDED6D2D2BD0CD6ull, 
	0x5DA33EFEFE215D3Eull, 0x9A31DDABAB3D9ADDull, 0xF474278080BAF427ull, 0xFCE0481C1C6CFC48ull, 
	0x42F18DB3B345428Dull, 0x0F676D6868D50F6Dull, 0x49DC599595FB4959ull, 0xDAE5823F3FC3DA82ull, 
	0xF93698CFCFD4F998ull, 0x911C098D8D839109ull, 0xA9D7197E7E9BA919ull, 0x3EA47B9A9AC83E7Bull, 
	0x28FECED6D6A928CEull, 0xC3D85A1B1B77C35Aull, 0x66D195B7B7516695ull, 0x2D281E0505112D1Eull, 
	0xA495A63131F5A4A6ull, 0x066F6B6969D0066Bull, 0x2605CA2323AF26CAull, 0x327AAD48487532ADull, 
	0xEABAFD50500DEAFDull, 0xA509CFACAC26A5CFull, 0xA14376E2E24DA176ull, 0x07F302F4F4030702ull, 
	0xB719C3AEAE2CB7C3ull, 0x1B180A03030F1B0Aull, 0x305F7F6F6FCE307Full, 0xF8AAF1525207F8F1ull, 
	0x1035DE2525B110DEull, 0xE5DD903838D8E590ull, 0xB3537AE0E047B37Aull, 0xC244338686A4C233ull, 
	0xB4A078141444B478ull, 0xBBC7157C7C91BB15ull, 0x7BA6F4DDDD8E7BF4ull, 0x708B20FBFB307020ull, 
	0x5BCC559797F15B55ull, 0xCF068CC9C9CACF8Cull, 0x03B9BBBABA6803BBull, 0x73329B414158739Bull, 
	0x59E987B0B04A5987ull, 0x2ADB1CF1F1122A1Cull, 0xD582EF575716D5EFull, 0x2B47756C6CC12B75ull, 
	0xD8C050181878D850ull, 0x33E6C4D5D5A633C4ull, 0xF03E9ECECED1F09Eull, 0x2962A74B4B7A29A7ull, 
	0x5875EE2D2D9958EEull, 0x76E44B9292E0764Bull, 0x89BDB83434E489B8ull, 0x36301406061E3614ull, 
	0xA0DF1F7F7F9EA01Full, 0xE90346EAEA65E946ull, 0x8821D1A9A93788D1ull, 0xEF6C2D8383B5EF2Dull, 
	0x53583A0B0B27533Aull, 0x9339DBAAAA3893DBull, 0x568EEAD8D89F56EAull, 0xC8F58E3D3DC9C88Eull, 
	0xE89F2F7777B6E82Full, 0x9DC2DF5F5F3E9DDFull, 0x4C0A894646434C89ull, 0x8E4EBAC0C0E78EBAull, 
	0x08946F9C9CD6086Full, 0x193DD82424B419D8ull, 0x5537516262F75551ull, 0x2799A3BEBE7C27A3ull, 
	0xBDA87E151541BD7Eull, 0xFD7C218181BFFD21ull, 0x38CB10F3F3183810ull, 0xF21B4CE9E96AF24Cull, 

	/* LT4 */
	0x9CF7CD9C3A3AD2F7ull, 0xC7B9E2C75B5B2AB9ull, 0x1631C316F2F21D31ull, 0x227778220F0F3377ull, 
	0x62977362E4E45397ull, 0xC9AC01C9ADAD23ACull, 0xF67C55F629298D7Cull, 0x416DFC419191EF6Dull, 
	0xA4A366A4C5C5F6A3ull, 0x8F45028F47474645ull, 0xB711A9B7B8B86211ull, 0x575C3F576363F25Cull, 
	0x0F98140F8C8C8698ull, 0x6090806010105090ull, 0xFE60BEFEDEDE8160ull, 0x29E197297676B3E1ull, 
	0xE8517DE82C2C9C51ull, 0x23FA8F237575BCFAull, 0x11B53C11898997B5ull, 0x9D7A3A9D40405D7Aull, 
	0xEDD271EDA3A315D2ull, 0x7CBA5B7CE1E142BAull, 0xACBF8DAC3232FABFull, 0x73224F736D6DC422ull, 
	0xBD0AB1BDBBBB6D0Aull, 0x247E70240E0E367Eull, 0xAEB87EAEC6C6F9B8ull, 0x5F40D45F9494FE40ull, 
	0x26798326FAFA3579ull, 0xF869B6F8DFDF8469ull, 0x72AFB87217174BAFull, 0xCDA2FACD585825A2ull, 
	0x5B4E2F5B6161F84Eull, 0xDA1ECEDAD0D0B71Eull, 0xFFED49FFA4A40EEDull, 0x9974C199B5B55B74ull, 
	0x2BE6642B8282B0E6ull, 0x324FB332FCFC2B4Full, 0x4D7FEC4D9393E57Full, 0xFC674DFC2A2A8267ull, 
	0xBF0D42BF4F4F6E0Dull, 0x8AC60E8AC8C8CFC6ull, 0x123F381207071B3Full, 0x96ECD5963939DDECull, 
	0x54D63B54EDED7ED6ull, 0x0784FF077B7B8A84ull, 0xE9DC8AE9565613DCull, 0x44EEF0441E1E66EEull, 
	0x688C6B68E7E75C8Cull, 0x855E1A854444495Eull, 0x4764F4479090EA64ull, 0x0B96EF0B79798096ull, 
	0x9AFEC59A3B3BD7FEull, 0xD40B2DD42626BE0Bull, 0xC5BE11C5AFAF29BEull, 0x2A6B932AF8F83F6Bull, 
	0xD005D6D0D3D3B805ull, 0xC1B0EAC15A5A2FB0ull, 0x6699886611115599ull, 0x39D95C398585ABD9ull, 
	0x793957796E6ECB39ull, 0x8B4BF98BB2B2404Bull, 0x92E22E92CCCCDBE2ull, 0x2E65682E0D0D3965ull, 
	0x8357128345454C57ull, 0x52DF3352ECEC7BDFull, 0x74A6B07416164EA6ull, 0xC63415C62121A534ull, 
	0xD994CAD95E5E3B94ull, 0x3DD7A73D7070ADD7ull, 0x3048403008082848ull, 0xA52E91A5BFBF792Eull, 
	0x611D77616A6ADF1Dull, 0xAAB685AA3333FFB6ull, 0x7125BC719999C725ull, 0xA8B176A8C7C7FCB1ull, 
	0xE04D96E0DBDB904Dull, 0x3446BB34FDFD2E46ull, 0x3FD0543F8484AED0ull, 0xEBDB79EBA2A210DBull, 
	0x0E15E30EF6F60915ull, 0xB118A1B1B9B96718ull, 0xBE80B5BE3535E180ull, 0xC23AEEC2D4D4A33Aull, 
	0x65138C659F9FD913ull, 0x4F781F4F6767E678ull, 0x1DA72C1D8B8B9DA7ull, 0x5ECD235EEEEE71CDull, 
	0x31C5B7317272A7C5ull, 0x4EF5E84E1D1D69F5ull, 0xD586DAD55C5C3186ull, 0xE7C969E7A0A01AC9ull, 
	0xF0755DF028288875ull, 0x9761229743435261ull, 0x0609080601010509ull, 0x86D41E86CACAC5D4ull, 
	0xEC5F86ECD9D99A5Full, 0x497117496666E371ull, 0x286C60280C0C3C6Cull, 0x081CEB08F7F70C1Cull, 
	0x94EB2694CDCDDEEBull, 0x9F7DC99FB4B45E7Dull, 0x5CCAD05C1A1A72CAull, 0x37CCBF377373A2CCull, 
	0x4AFB134AE8E86FFBull, 0x05830C058F8F8983ull, 0xF9E441F9A5A50BE4ull, 0xFBE3B2FB515108E3ull, 
	0x91682A9142425768ull, 0xE4436DE42E2E9643ull, 0xA0AD9DA03030F0ADull, 0x7D37AC7D9B9BCD37ull, 
	0x69019C699D9DD301ull, 0x42E7F8421F1F63E7ull, 0x70A84B70E3E348A8ull, 0x80DD1680CBCBC0DDull, 
	0x2C629B2CF9F93A62ull, 0x1BAE241B8A8A98AEull, 0x456307456464E963ull, 0x88C1FD883C3CCCC1ull, 
	0x0000000000000000ull, 0x936FD993B6B6546Full, 0xB9044AB94E4E6B04ull, 0xCC2F0DCC2222AA2Full, 
	0xE1C061E1A1A11FC0ull, 0xE3C792E355551CC7ull, 0x0D9FE70D7878859Full, 0xC821F6C8D7D7AC21ull, 
	0x6C82906C12125A82ull, 0x772CB4779898C22Cull, 0xA1206AA14A4A7F20ull, 0x038A04038E8E8C8Aull, 
	0x8150E181B1B14F50ull, 0xB09556B0C3C3E895ull, 0xF272AEF2DCDC8B72ull, 0xE5CE9AE5545419CEull, 
	0xF3FF59F3A6A604FFull, 0x1A23D31AF0F01723ull, 0x40E00B40EBEB60E0ull, 0x13B2CF137D7D94B2ull, 
	0x3641483609092D41ull, 0xB292A5B23737EB92ull, 0xE24A65E22F2F934Aull, 0x436A0F436565EC6Aull, 
	0x17BC3417888892BCull, 0xB69C5EB6C2C2ED9Cull, 0xFA6E45FA2B2B876Eull, 0x6A8B986A13135F8Bull, 
	0x5D47275D6060FD47ull, 0x631A84639E9EDC1Aull, 0x040EFB04F5F5060Eull, 0xF5F651F5A7A701F6ull, 
	0xCBABF2CB595920ABull, 0xDC17C6DCD1D1B217ull, 0x018DF7017A7A8F8Dull, 0x58C42B58EFEF74C4ull, 
	0xB49BADB43636EE9Bull, 0x1824201804041424ull, 0xB31F52B34D4D641Full, 0xAF3589AFBCBC7635ull, 
	0xF7F1A2F7535302F1ull, 0x84D3ED843E3EC6D3ull, 0xA93C81A9BDBD733Cull, 0xD78129D7A8A83281ull, 
	0xB5165AB54C4C6116ull, 0x0C12100C02020A12ull, 0x3BDEAF3B7171A8DEull, 0x56D1C85619197DD1ull, 
	0x35CB4C358787A1CBull, 0x649E7B64E5E5569Eull, 0x3854AB38FFFF2454ull, 0xE6449EE6DADA9544ull, 
	0xA2AA6EA2C4C4F3AAull, 0x5352C4539696F452ull, 0x67147F676B6BDA14ull, 0xC03D1DC02020A03Dull, 
	0x25F387257474B9F3ull, 0xD20225D22727BB02ull, 0xBC8746BCC1C1E287ull, 0x6E85636EE6E65985ull, 
	0x3C5A503C0A0A225Aull, 0xAB3B72AB4949703Bull, 0xD38FD2D35D5D348Full, 0xD60CDED6D2D2BD0Cull, 
	0x3E5DA33EFEFE215Dull, 0xDD9A31DDABAB3D9Aull, 0x27F474278080BAF4ull, 0x48FCE0481C1C6CFCull, 
	0x8D42F18DB3B34542ull, 0x6D0F676D6868D50Full, 0x5949DC599595FB49ull, 0x82DAE5823F3FC3DAull, 
	0x98F93698CFCFD4F9ull, 0x09911C098D8D8391ull, 0x19A9D7197E7E9BA9ull, 0x7B3EA47B9A9AC83Eull, 
	0xCE28FECED6D6A928ull, 0x5AC3D85A1B1B77C3ull, 0x9566D195B7B75166ull, 0x1E2D281E0505112Dull, 
	0xA6A495A63131F5A4ull, 0x6B066F6B6969D006ull, 0xCA2605CA2323AF26ull, 0xAD327AAD48487532ull, 
	0xFDEABAFD50500DEAull, 0xCFA509CFACAC26A5ull, 0x76A14376E2E24DA1ull, 0x0207F302F4F40307ull, 
	0xC3B719C3AEAE2CB7ull, 0x0A1B180A03030F1Bull, 0x7F305F7F6F6FCE30ull, 0xF1F8AAF1525207F8ull, 
	0xDE1035DE2525B110ull, 0x90E5DD903838D8E5ull, 0x7AB3537AE0E047B3ull, 0x33C244338686A4C2ull, 
	0x78B4A078141444B4ull, 0x15BBC7157C7C91BBull, 0xF47BA6F4DDDD8E7Bull, 0x20708B20FBFB3070ull, 
	0x555BCC559797F15Bull, 0x8CCF068CC9C9CACFull, 0xBB03B9BBBABA6803ull, 0x9B73329B41415873ull, 
	0x8759E987B0B04A59ull, 0x1C2ADB1CF1F1122Aull, 0xEFD582EF575716D5ull, 0x752B47756C6CC12Bull, 
	0x50D8C050181878D8ull, 0xC433E6C4D5D5A633ull, 0x9EF03E9ECECED1F0ull, 0xA72962A74B4B7A29ull, 
	0xEE5875EE2D2D9958ull, 0x4B76E44B9292E076ull, 0xB889BDB83434E489ull, 0x1436301406061E36ull, 
	0x1FA0DF1F7F7F9EA0ull, 0x46E90346EAEA65E9ull, 0xD18821D1A9A93788ull, 0x2DEF6C2D8383B5EFull, 
	0x3A53583A0B0B2753ull, 0xDB9339DBAAAA3893ull, 0xEA568EEAD8D89F56ull, 0x8EC8F58E3D3DC9C8ull, 
	0x2FE89F2F7777B6E8ull, 0xDF9DC2DF5F5F3E9Dull, 0x894C0A894646434Cull, 0xBA8E4EBAC0C0E78Eull, 
	0x6F08946F9C9CD608ull, 0xD8193DD82424B419ull, 0x515537516262F755ull, 0xA32799A3BEBE7C27ull, 
	0x7EBDA87E151541BDull, 0x21FD7C218181BFFDull, 0x1038CB10F3F31838ull, 0x4CF21B4CE9E96AF2ull, 

	/* LT5 */
	0xF79CF7CD9C3A3AD2ull, 0xB9C7B9E2C75B5B2Aull, 0x311631C316F2F21Dull, 0x77227778220F0F33ull, 
	0x9762977362E4E453ull, 0xACC9AC01C9ADAD23ull, 0x7CF67C55F629298Dull, 0x6D416DFC419191EFull, 
	0xA3A4A366A4C5C5F6ull, 0x458F45028F474746ull, 0x11B711A9B7B8B862ull, 0x5C575C3F576363F2ull, 
	0x980F98140F8C8C86ull, 0x9060908060101050ull, 0x60FE60BEFEDEDE81ull, 0xE129E197297676B3ull, 
	0x51E8517DE82C2C9Cull, 0xFA23FA8F237575BCull, 0xB511B53C11898997ull, 0x7A9D7A3A9D40405Dull, 
	0xD2EDD271EDA3A315ull, 0xBA7CBA5B7CE1E142ull, 0xBFACBF8DAC3232FAull, 0x2273224F736D6DC4ull, 
	0x0ABD0AB1BDBBBB6Dull, 0x7E247E70240E0E36ull, 0xB8AEB87EAEC6C6F9ull, 0x405F40D45F9494FEull, 
	0x7926798326FAFA35ull, 0x69F869B6F8DFDF84ull, 0xAF72AFB87217174Bull, 0xA2CDA2FACD585825ull, 
	0x4E5B4E2F5B6161F8ull, 0x1EDA1ECEDAD0D0B7ull, 0xEDFFED49FFA4A40Eull, 0x749974C199B5B55Bull, 
	0xE62BE6642B8282B0ull, 0x4F324FB332FCFC2Bull, 0x7F4D7FEC4D9393E5ull, 0x67FC674DFC2A2A82ull, 
	0x0DBF0D42BF4F4F6Eull, 0xC68AC60E8AC8C8CFull, 0x3F123F381207071Bull, 0xEC96ECD5963939DDull, 
	0xD654D63B54EDED7Eull, 0x840784FF077B7B8Aull, 0xDCE9DC8AE9565613ull, 0xEE44EEF0441E1E66ull, 
	0x8C688C6B68E7E75Cull, 0x5E855E1A85444449ull, 0x644764F4479090EAull, 0x960B96EF0B797980ull, 
	0xFE9AFEC59A3B3BD7ull, 0x0BD40B2DD42626BEull, 0xBEC5BE11C5AFAF29ull, 0x6B2A6B932AF8F83Full, 
	0x05D005D6D0D3D3B8ull, 0xB0C1B0EAC15A5A2Full, 0x9966998866111155ull, 0xD939D95C398585ABull, 
	0x39793957796E6ECBull, 0x4B8B4BF98BB2B240ull, 0xE292E22E92CCCCDBull, 0x652E65682E0D0D39ull, 
	0x578357128345454Cull, 0xDF52DF3352ECEC7Bull, 0xA674A6B07416164Eull, 0x34C63415C62121A5ull, 
	0x94D994CAD95E5E3Bull, 0xD73DD7A73D7070ADull, 0x4830484030080828ull, 0x2EA52E91A5BFBF79ull, 
	0x1D611D77616A6ADFull, 0xB6AAB685AA3333FFull, 0x257125BC719999C7ull, 0xB1A8B176A8C7C7FCull, 
	0x4DE04D96E0DBDB90ull, 0x463446BB34FDFD2Eull, 0xD03FD0543F8484AEull, 0xDBEBDB79EBA2A210ull, 
	0x150E15E30EF6F609ull, 0x18B118A1B1B9B967ull, 0x80BE80B5BE3535E1ull, 0x3AC23AEEC2D4D4A3ull, 
	0x1365138C659F9FD9ull, 0x784F781F4F6767E6ull, 0xA71DA72C1D8B8B9Dull, 0xCD5ECD235EEEEE71ull, 
	0xC531C5B7317272A7ull, 0xF54EF5E84E1D1D69ull, 0x86D586DAD55C5C31ull, 0xC9E7C969E7A0A01Aull, 
	0x75F0755DF0282888ull, 0x6197612297434352ull, 0x0906090806010105ull, 0xD486D41E86CACAC5ull, 
	0x5FEC5F86ECD9D99Aull, 0x71497117496666E3ull, 0x6C286C60280C0C3Cull, 0x1C081CEB08F7F70Cull, 
	0xEB94EB2694CDCDDEull, 0x7D9F7DC99FB4B45Eull, 0xCA5CCAD05C1A1A72ull, 0xCC37CCBF377373A2ull, 
	0xFB4AFB134AE8E86Full, 0x8305830C058F8F89ull, 0xE4F9E441F9A5A50Bull, 0xE3FBE3B2FB515108ull, 
	0x6891682A91424257ull, 0x43E4436DE42E2E96ull, 0xADA0AD9DA03030F0ull, 0x377D37AC7D9B9BCDull, 
	0x0169019C699D9DD3ull, 0xE742E7F8421F1F63ull, 0xA870A84B70E3E348ull, 0xDD80DD1680CBCBC0ull, 
	0x622C629B2CF9F93Aull, 0xAE1BAE241B8A8A98ull, 0x63456307456464E9ull, 0xC188C1FD883C3CCCull, 
	0x0000000000000000ull, 0x6F936FD993B6B654ull, 0x04B9044AB94E4E6Bull, 0x2FCC2F0DCC2222AAull, 
	0xC0E1C061E1A1A11Full, 0xC7E3C792E355551Cull, 0x9F0D9FE70D787885ull, 0x21C821F6C8D7D7ACull, 
	0x826C82906C12125Aull, 0x2C772CB4779898C2ull, 0x20A1206AA14A4A7Full, 0x8A038A04038E8E8Cull, 
	0x508150E181B1B14Full, 0x95B09556B0C3C3E8ull, 0x72F272AEF2DCDC8Bull, 0xCEE5CE9AE5545419ull, 
	0xFFF3FF59F3A6A604ull, 0x231A23D31AF0F017ull, 0xE040E00B40EBEB60ull, 0xB213B2CF137D7D94ull, 
	0x413641483609092Dull, 0x92B292A5B23737EBull, 0x4AE24A65E22F2F93ull, 0x6A436A0F436565ECull, 
	0xBC17BC3417888892ull, 0x9CB69C5EB6C2C2EDull, 0x6EFA6E45FA2B2B87ull, 0x8B6A8B986A13135Full, 
	0x475D47275D6060FDull, 0x1A631A84639E9EDCull, 0x0E040EFB04F5F506ull, 0xF6F5F651F5A7A701ull, 
	0xABCBABF2CB595920ull, 0x17DC17C6DCD1D1B2ull, 0x8D018DF7017A7A8Full, 0xC458C42B58EFEF74ull, 
	0x9BB49BADB43636EEull, 0x2418242018040414ull, 0x1FB31F52B34D4D64ull, 0x35AF3589AFBCBC76ull, 
	0xF1F7F1A2F7535302ull, 0xD384D3ED843E3EC6ull, 0x3CA93C81A9BDBD73ull, 0x81D78129D7A8A832ull, 
	0x16B5165AB54C4C61ull, 0x120C12100C02020Aull, 0xDE3BDEAF3B7171A8ull, 0xD156D1C85619197Dull, 
	0xCB35CB4C358787A1ull, 0x9E649E7B64E5E556ull, 0x543854AB38FFFF24ull, 0x44E6449EE6DADA95ull, 
	0xAAA2AA6EA2C4C4F3ull, 0x525352C4539696F4ull, 0x1467147F676B6BDAull, 0x3DC03D1DC02020A0ull, 
	0xF325F387257474B9ull, 0x02D20225D22727BBull, 0x87BC8746BCC1C1E2ull, 0x856E85636EE6E659ull, 
	0x5A3C5A503C0A0A22ull, 0x3BAB3B72AB494970ull, 0x8FD38FD2D35D5D34ull, 0x0CD60CDED6D2D2BDull, 
	0x5D3E5DA33EFEFE21ull, 0x9ADD9A31DDABAB3Dull, 0xF427F474278080BAull, 0xFC48FCE0481C1C6Cull, 
	0x428D42F18DB3B345ull, 0x0F6D0F676D6868D5ull, 0x495949DC599595FBull, 0xDA82DAE5823F3FC3ull, 
	0xF998F93698CFCFD4ull, 0x9109911C098D8D83ull, 0xA919A9D7197E7E9Bull, 0x3E7B3EA47B9A9AC8ull, 
	0x28CE28FECED6D6A9ull, 0xC35AC3D85A1B1B77ull, 0x669566D195B7B751ull, 0x2D1E2D281E050511ull, 
	0xA4A6A495A63131F5ull, 0x066B066F6B6969D0ull, 0x26CA2605CA2323AFull, 0x32AD327AAD484875ull, 
	0xEAFDEABAFD50500Dull, 0xA5CFA509CFACAC26ull, 0xA176A14376E2E24Dull, 0x070207F302F4F403ull, 
	0xB7C3B719C3AEAE2Cull, 0x1B0A1B180A03030Full, 0x307F305F7F6F6FCEull, 0xF8F1F8AAF1525207ull, 
	0x10DE1035DE2525B1ull, 0xE590E5DD903838D8ull, 0xB37AB3537AE0E047ull, 0xC233C244338686A4ull, 
	0xB478B4A078141444ull, 0xBB15BBC7157C7C91ull, 0x7BF47BA6F4DDDD8Eull, 0x7020708B20FBFB30ull, 
	0x5B555BCC559797F1ull, 0xCF8CCF068CC9C9CAull, 0x03BB03B9BBBABA68ull, 0x739B73329B414158ull, 
	0x598759E987B0B04Aull, 0x2A1C2ADB1CF1F112ull, 0xD5EFD582EF575716ull, 0x2B752B47756C6CC1ull, 
	0xD850D8C050181878ull, 0x33C433E6C4D5D5A6ull, 0xF09EF03E9ECECED1ull, 0x29A72962A74B4B7Aull, 
	0x58EE5875EE2D2D99ull, 0x764B76E44B9292E0ull, 0x89B889BDB83434E4ull, 0x361436301406061Eull, 
	0xA01FA0DF1F7F7F9Eull, 0xE946E90346EAEA65ull, 0x88D18821D1A9A937ull, 0xEF2DEF6C2D8383B5ull, 
	0x533A53583A0B0B27ull, 0x93DB9339DBAAAA38ull, 0x56EA568EEAD8D89Full, 0xC88EC8F58E3D3DC9ull, 
	0xE82FE89F2F7777B6ull, 0x9DDF9DC2DF5F5F3Eull, 0x4C894C0A89464643ull, 0x8EBA8E4EBAC0C0E7ull, 
	0x086F08946F9C9CD6ull, 0x19D8193DD82424B4ull, 0x55515537516262F7ull, 0x27A32799A3BEBE7Cull, 
	0xBD7EBDA87E151541ull, 0xFD21FD7C218181BFull, 0x381038CB10F3F318ull, 0xF24CF21B4CE9E96Aull, 

	/* LT6 */
	0xD2F79CF7CD9C3A3Aull, 0x2AB9C7B9E2C75B5Bull, 0x1D311631C316F2F2ull, 0x3377227778220F0Full, 
	0x539762977362E4E4ull, 0x23ACC9AC01C9ADADull, 0x8D7CF67C55F62929ull, 0xEF6D416DFC419191ull, 
	0xF6A3A4A366A4C5C5ull, 0x46458F45028F4747ull, 0x6211B711A9B7B8B8ull, 0xF25C575C3F576363ull, 
	0x86980F98140F8C8Cull, 0x5090609080601010ull, 0x8160FE60BEFEDEDEull, 0xB3E129E197297676ull, 
	0x9C51E8517DE82C2Cull, 0xBCFA23FA8F237575ull, 0x97B511B53C118989ull, 0x5D7A9D7A3A9D4040ull, 
	0x15D2EDD271EDA3A3ull, 0x42BA7CBA5B7CE1E1ull, 0xFABFACBF8DAC3232ull, 0xC42273224F736D6Dull, 
	0x6D0ABD0AB1BDBBBBull, 0x367E247E70240E0Eull, 0xF9B8AEB87EAEC6C6ull, 0xFE405F40D45F9494ull, 
	0x357926798326FAFAull, 0x8469F869B6F8DFDFull, 0x4BAF72AFB8721717ull, 0x25A2CDA2FACD5858ull, 
	0xF84E5B4E2F5B6161ull, 0xB71EDA1ECEDAD0D0ull, 0x0EEDFFED49FFA4A4ull, 0x5B749974C199B5B5ull, 
	0xB0E62BE6642B8282ull, 0x2B4F324FB332FCFCull, 0xE57F4D7FEC4D9393ull, 0x8267FC674DFC2A2Aull, 
	0x6E0DBF0D42BF4F4Full, 0xCFC68AC60E8AC8C8ull, 0x1B3F123F38120707ull, 0xDDEC96ECD5963939ull, 
	0x7ED654D63B54EDEDull, 0x8A840784FF077B7Bull, 0x13DCE9DC8AE95656ull, 0x66EE44EEF0441E1Eull, 
	0x5C8C688C6B68E7E7ull, 0x495E855E1A854444ull, 0xEA644764F4479090ull, 0x80960B96EF0B7979ull, 
	0xD7FE9AFEC59A3B3Bull, 0xBE0BD40B2DD42626ull, 0x29BEC5BE11C5AFAFull, 0x3F6B2A6B932AF8F8ull, 
	0xB805D005D6D0D3D3ull, 0x2FB0C1B0EAC15A5Aull, 0x5599669988661111ull, 0xABD939D95C398585ull, 
	0xCB39793957796E6Eull, 0x404B8B4BF98BB2B2ull, 0xDBE292E22E92CCCCull, 0x39652E65682E0D0Dull, 
	0x4C57835712834545ull, 0x7BDF52DF3352ECECull, 0x4EA674A6B0741616ull, 0xA534C63415C62121ull, 
	0x3B94D994CAD95E5Eull, 0xADD73DD7A73D7070ull, 0x2848304840300808ull, 0x792EA52E91A5BFBFull, 
	0xDF1D611D77616A6Aull, 0xFFB6AAB685AA3333ull, 0xC7257125BC719999ull, 0xFCB1A8B176A8C7C7ull, 
	0x904DE04D96E0DBDBull, 0x2E463446BB34FDFDull, 0xAED03FD0543F8484ull, 0x10DBEBDB79EBA2A2ull, 
	0x09150E15E30EF6F6ull, 0x6718B118A1B1B9B9ull, 0xE180BE80B5BE3535ull, 0xA33AC23AEEC2D4D4ull, 
	0xD91365138C659F9Full, 0xE6784F781F4F6767ull, 0x9DA71DA72C1D8B8Bull, 0x71CD5ECD235EEEEEull, 
	0xA7C531C5B7317272ull, 0x69F54EF5E84E1D1Dull, 0x3186D586DAD55C5Cull, 0x1AC9E7C969E7A0A0ull, 
	0x8875F0755DF02828ull, 0x5261976122974343ull, 0x0509060908060101ull, 0xC5D486D41E86CACAull, 
	0x9A5FEC5F86ECD9D9ull, 0xE371497117496666ull, 0x3C6C286C60280C0Cull, 0x0C1C081CEB08F7F7ull, 
	0xDEEB94EB2694CDCDull, 0x5E7D9F7DC99FB4B4ull, 0x72CA5CCAD05C1A1Aull, 0xA2CC37CCBF377373ull, 
	0x6FFB4AFB134AE8E8ull, 0x898305830C058F8Full, 0x0BE4F9E441F9A5A5ull, 0x08E3FBE3B2FB5151ull, 
	0x576891682A914242ull, 0x9643E4436DE42E2Eull, 0xF0ADA0AD9DA03030ull, 0xCD377D37AC7D9B9Bull, 
	0xD30169019C699D9Dull, 0x63E742E7F8421F1Full, 0x48A870A84B70E3E3ull, 0xC0DD80DD1680CBCBull, 
	0x3A622C629B2CF9F9ull, 0x98AE1BAE241B8A8Aull, 0xE963456307456464ull, 0xCCC188C1FD883C3Cull, 
	0x0000000000000000ull, 0x546F936FD993B6B6ull, 0x6B04B9044AB94E4Eull, 0xAA2FCC2F0DCC2222ull, 
	0x1FC0E1C061E1A1A1ull, 0x1CC7E3C792E35555ull, 0x859F0D9FE70D7878ull, 0xAC21C821F6C8D7D7ull, 
	0x5A826C82906C1212ull, 0xC22C772CB4779898ull, 0x7F20A1206AA14A4Aull, 0x8C8A038A04038E8Eull, 
	0x4F508150E181B1B1ull, 0xE895B09556B0C3C3ull, 0x8B72F272AEF2DCDCull, 0x19CEE5CE9AE55454ull, 
	0x04FFF3FF59F3A6A6ull, 0x17231A23D31AF0F0ull, 0x60E040E00B40EBEBull, 0x94B213B2CF137D7Dull, 
	0x2D41364148360909ull, 0xEB92B292A5B23737ull, 0x934AE24A65E22F2Full, 0xEC6A436A0F436565ull, 
	0x92BC17BC34178888ull, 0xED9CB69C5EB6C2C2ull, 0x876EFA6E45FA2B2Bull, 0x5F8B6A8B986A1313ull, 
	0xFD475D47275D6060ull, 0xDC1A631A84639E9Eull, 0x060E040EFB04F5F5ull, 0x01F6F5F651F5A7A7ull, 
	0x20ABCBABF2CB5959ull, 0xB217DC17C6DCD1D1ull, 0x8F8D018DF7017A7Aull, 0x74C458C42B58EFEFull, 
	0xEE9BB49BADB43636ull, 0x1424182420180404ull, 0x641FB31F52B34D4Dull, 0x7635AF3589AFBCBCull, 
	0x02F1F7F1A2F75353ull, 0xC6D384D3ED843E3Eull, 0x733CA93C81A9BDBDull, 0x3281D78129D7A8A8ull, 
	0x6116B5165AB54C4Cull, 0x0A120C12100C0202ull, 0xA8DE3BDEAF3B7171ull, 0x7DD156D1C8561919ull, 
	0xA1CB35CB4C358787ull, 0x569E649E7B64E5E5ull, 0x24543854AB38FFFFull, 0x9544E6449EE6DADAull, 
	0xF3AAA2AA6EA2C4C4ull, 0xF4525352C4539696ull, 0xDA1467147F676B6Bull, 0xA03DC03D1DC02020ull, 
	0xB9F325F387257474ull, 0xBB02D20225D22727ull, 0xE287BC8746BCC1C1ull, 0x59856E85636EE6E6ull, 
	0x225A3C5A503C0A0Aull, 0x703BAB3B72AB4949ull, 0x348FD38FD2D35D5Dull, 0xBD0CD60CDED6D2D2ull, 
	0x215D3E5DA33EFEFEull, 0x3D9ADD9A31DDABABull, 0xBAF427F474278080ull, 0x6CFC48FCE0481C1Cull, 
	0x45428D42F18DB3B3ull, 0xD50F6D0F676D6868ull, 0xFB495949DC599595ull, 0xC3DA82DAE5823F3Full, 
	0xD4F998F93698CFCFull, 0x839109911C098D8Dull, 0x9BA919A9D7197E7Eull, 0xC83E7B3EA47B9A9Aull, 
	0xA928CE28FECED6D6ull, 0x77C35AC3D85A1B1Bull, 0x51669566D195B7B7ull, 0x112D1E2D281E0505ull, 
	0xF5A4A6A495A63131ull, 0xD0066B066F6B6969ull, 0xAF26CA2605CA2323ull, 0x7532AD327AAD4848ull, 
	0x0DEAFDEABAFD5050ull, 0x26A5CFA509CFACACull, 0x4DA176A14376E2E2ull, 0x03070207F302F4F4ull, 
	0x2CB7C3B719C3AEAEull, 0x0F1B0A1B180A0303ull, 0xCE307F305F7F6F6Full, 0x07F8F1F8AAF15252ull, 
	0xB110DE1035DE2525ull, 0xD8E590E5DD903838ull, 0x47B37AB3537AE0E0ull, 0xA4C233C244338686ull, 
	0x44B478B4A0781414ull, 0x91BB15BBC7157C7Cull, 0x8E7BF47BA6F4DDDDull, 0x307020708B20FBFBull, 
	0xF15B555BCC559797ull, 0xCACF8CCF068CC9C9ull, 0x6803BB03B9BBBABAull, 0x58739B73329B4141ull, 
	0x4A598759E987B0B0ull, 0x122A1C2ADB1CF1F1ull, 0x16D5EFD582EF5757ull, 0xC12B752B47756C6Cull, 
	0x78D850D8C0501818ull, 0xA633C433E6C4D5D5ull, 0xD1F09EF03E9ECECEull, 0x7A29A72962A74B4Bull, 
	0x9958EE5875EE2D2Dull, 0xE0764B76E44B9292ull, 0xE489B889BDB83434ull, 0x1E36143630140606ull, 
	0x9EA01FA0DF1F7F7Full, 0x65E946E90346EAEAull, 0x3788D18821D1A9A9ull, 0xB5EF2DEF6C2D8383ull, 
	0x27533A53583A0B0Bull, 0x3893DB9339DBAAAAull, 0x9F56EA568EEAD8D8ull, 0xC9C88EC8F58E3D3Dull, 
	0xB6E82FE89F2F7777ull, 0x3E9DDF9DC2DF5F5Full, 0x434C894C0A894646ull, 0xE78EBA8E4EBAC0C0ull, 
	0xD6086F08946F9C9Cull, 0xB419D8193DD82424ull, 0xF755515537516262ull, 0x7C27A32799A3BEBEull, 
	0x41BD7EBDA87E1515ull, 0xBFFD21FD7C218181ull, 0x18381038CB10F3F3ull, 0x6AF24CF21B4CE9E9ull, 

	/* LT7 */
	0x3AD2F79CF7CD9C3Aull, 0x5B2AB9C7B9E2C75Bull, 0xF21D311631C316F2ull, 0x0F3377227778220Full, 
	0xE4539762977362E4ull, 0xAD23ACC9AC01C9ADull, 0x298D7CF67C55F629ull, 0x91EF6D416DFC4191ull, 
	0xC5F6A3A4A366A4C5ull, 0x4746458F45028F47ull, 0xB86211B711A9B7B8ull, 0x63F25C575C3F5763ull, 
	0x8C86980F98140F8Cull, 0x1050906090806010ull, 0xDE8160FE60BEFEDEull, 0x76B3E129E1972976ull, 
	0x2C9C51E8517DE82Cull, 0x75BCFA23FA8F2375ull, 0x8997B511B53C1189ull, 0x405D7A9D7A3A9D40ull, 
	0xA315D2EDD271EDA3ull, 0xE142BA7CBA5B7CE1ull, 0x32FABFACBF8DAC32ull, 0x6DC42273224F736Dull, 
	0xBB6D0ABD0AB1BDBBull, 0x0E367E247E70240Eull, 0xC6F9B8AEB87EAEC6ull, 0x94FE405F40D45F94ull, 
	0xFA357926798326FAull, 0xDF8469F869B6F8DFull, 0x174BAF72AFB87217ull, 0x5825A2CDA2FACD58ull, 
	0x61F84E5B4E2F5B61ull, 0xD0B71EDA1ECEDAD0ull, 0xA40EEDFFED49FFA4ull, 0xB55B749974C199B5ull, 
	0x82B0E62BE6642B82ull, 0xFC2B4F324FB332FCull, 0x93E57F4D7FEC4D93ull, 0x2A8267FC674DFC2Aull, 
	0x4F6E0DBF0D42BF4Full, 0xC8CFC68AC60E8AC8ull, 0x071B3F123F381207ull, 0x39DDEC96ECD59639ull, 
	0xED7ED654D63B54EDull, 0x7B8A840784FF077Bull, 0x5613DCE9DC8AE956ull, 0x1E66EE44EEF0441Eull, 
	0xE75C8C688C6B68E7ull, 0x44495E855E1A8544ull, 0x90EA644764F44790ull, 0x7980960B96EF0B79ull, 
	0x3BD7FE9AFEC59A3Bull, 0x26BE0BD40B2DD426ull, 0xAF29BEC5BE11C5AFull, 0xF83F6B2A6B932AF8ull, 
	0xD3B805D005D6D0D3ull, 0x5A2FB0C1B0EAC15Aull, 0x1155996699886611ull, 0x85ABD939D95C3985ull, 
	0x6ECB39793957796Eull, 0xB2404B8B4BF98BB2ull, 0xCCDBE292E22E92CCull, 0x0D39652E65682E0Dull, 
	0x454C578357128345ull, 0xEC7BDF52DF3352ECull, 0x164EA674A6B07416ull, 0x21A534C63415C621ull, 
	0x5E3B94D994CAD95Eull, 0x70ADD73DD7A73D70ull, 0x0828483048403008ull, 0xBF792EA52E91A5BFull, 
	0x6ADF1D611D77616Aull, 0x33FFB6AAB685AA33ull, 0x99C7257125BC7199ull, 0xC7FCB1A8B176A8C7ull, 
	0xDB904DE04D96E0DBull, 0xFD2E463446BB34FDull, 0x84AED03FD0543F84ull, 0xA210DBEBDB79EBA2ull, 
	0xF609150E15E30EF6ull, 0xB96718B118A1B1B9ull, 0x35E180BE80B5BE35ull, 0xD4A33AC23AEEC2D4ull, 
	0x9FD91365138C659Full, 0x67E6784F781F4F67ull, 0x8B9DA71DA72C1D8Bull, 0xEE71CD5ECD235EEEull, 
	0x72A7C531C5B73172ull, 0x1D69F54EF5E84E1Dull, 0x5C3186D586DAD55Cull, 0xA01AC9E7C969E7A0ull, 
	0x288875F0755DF028ull, 0x4352619761229743ull, 0x0105090609080601ull, 0xCAC5D486D41E86CAull, 
	0xD99A5FEC5F86ECD9ull, 0x66E3714971174966ull, 0x0C3C6C286C60280Cull, 0xF70C1C081CEB08F7ull, 
	0xCDDEEB94EB2694CDull, 0xB45E7D9F7DC99FB4ull, 0x1A72CA5CCAD05C1Aull, 0x73A2CC37CCBF3773ull, 
	0xE86FFB4AFB134AE8ull, 0x8F898305830C058Full, 0xA50BE4F9E441F9A5ull, 0x5108E3FBE3B2FB51ull, 
	0x42576891682A9142ull, 0x2E9643E4436DE42Eull, 0x30F0ADA0AD9DA030ull, 0x9BCD377D37AC7D9Bull, 
	0x9DD30169019C699Dull, 0x1F63E742E7F8421Full, 0xE348A870A84B70E3ull, 0xCBC0DD80DD1680CBull, 
	0xF93A622C629B2CF9ull, 0x8A98AE1BAE241B8Aull, 0x64E9634563074564ull, 0x3CCCC188C1FD883Cull, 
	0x0000000000000000ull, 0xB6546F936FD993B6ull, 0x4E6B04B9044AB94Eull, 0x22AA2FCC2F0DCC22ull, 
	0xA11FC0E1C061E1A1ull, 0x551CC7E3C792E355ull, 0x78859F0D9FE70D78ull, 0xD7AC21C821F6C8D7ull, 
	0x125A826C82906C12ull, 0x98C22C772CB47798ull, 0x4A7F20A1206AA14Aull, 0x8E8C8A038A04038Eull, 
	0xB14F508150E181B1ull, 0xC3E895B09556B0C3ull, 0xDC8B72F272AEF2DCull, 0x5419CEE5CE9AE554ull, 
	0xA604FFF3FF59F3A6ull, 0xF017231A23D31AF0ull, 0xEB60E040E00B40EBull, 0x7D94B213B2CF137Dull, 
	0x092D413641483609ull, 0x37EB92B292A5B237ull, 0x2F934AE24A65E22Full, 0x65EC6A436A0F4365ull, 
	0x8892BC17BC341788ull, 0xC2ED9CB69C5EB6C2ull, 0x2B876EFA6E45FA2Bull, 0x135F8B6A8B986A13ull, 
	0x60FD475D47275D60ull, 0x9EDC1A631A84639Eull, 0xF5060E040EFB04F5ull, 0xA701F6F5F651F5A7ull, 
	0x5920ABCBABF2CB59ull, 0xD1B217DC17C6DCD1ull, 0x7A8F8D018DF7017Aull, 0xEF74C458C42B58EFull, 
	0x36EE9BB49BADB436ull, 0x0414241824201804ull, 0x4D641FB31F52B34Dull, 0xBC7635AF3589AFBCull, 
	0x5302F1F7F1A2F753ull, 0x3EC6D384D3ED843Eull, 0xBD733CA93C81A9BDull, 0xA83281D78129D7A8ull, 
	0x4C6116B5165AB54Cull, 0x020A120C12100C02ull, 0x71A8DE3BDEAF3B71ull, 0x197DD156D1C85619ull, 
	0x87A1CB35CB4C3587ull, 0xE5569E649E7B64E5ull, 0xFF24543854AB38FFull, 0xDA9544E6449EE6DAull, 
	0xC4F3AAA2AA6EA2C4ull, 0x96F4525352C45396ull, 0x6BDA1467147F676Bull, 0x20A03DC03D1DC020ull, 
	0x74B9F325F3872574ull, 0x27BB02D20225D227ull, 0xC1E287BC8746BCC1ull, 0xE659856E85636EE6ull, 
	0x0A225A3C5A503C0Aull, 0x49703BAB3B72AB49ull, 0x5D348FD38FD2D35Dull, 0xD2BD0CD60CDED6D2ull, 
	0xFE215D3E5DA33EFEull, 0xAB3D9ADD9A31DDABull, 0x80BAF427F4742780ull, 0x1C6CFC48FCE0481Cull, 
	0xB345428D42F18DB3ull, 0x68D50F6D0F676D68ull, 0x95FB495949DC5995ull, 0x3FC3DA82DAE5823Full, 
	0xCFD4F998F93698CFull, 0x8D839109911C098Dull, 0x7E9BA919A9D7197Eull, 0x9AC83E7B3EA47B9Aull, 
	0xD6A928CE28FECED6ull, 0x1B77C35AC3D85A1Bull, 0xB751669566D195B7ull, 0x05112D1E2D281E05ull, 
	0x31F5A4A6A495A631ull, 0x69D0066B066F6B69ull, 0x23AF26CA2605CA23ull, 0x487532AD327AAD48ull, 
	0x500DEAFDEABAFD50ull, 0xAC26A5CFA509CFACull, 0xE24DA176A14376E2ull, 0xF403070207F302F4ull, 
	0xAE2CB7C3B719C3AEull, 0x030F1B0A1B180A03ull, 0x6FCE307F305F7F6Full, 0x5207F8F1F8AAF152ull, 
	0x25B110DE1035DE25ull, 0x38D8E590E5DD9038ull, 0xE047B37AB3537AE0ull, 0x86A4C233C2443386ull, 
	0x1444B478B4A07814ull, 0x7C91BB15BBC7157Cull, 0xDD8E7BF47BA6F4DDull, 0xFB307020708B20FBull, 
	0x97F15B555BCC5597ull, 0xC9CACF8CCF068CC9ull, 0xBA6803BB03B9BBBAull, 0x4158739B73329B41ull, 
	0xB04A598759E987B0ull, 0xF1122A1C2ADB1CF1ull, 0x5716D5EFD582EF57ull, 0x6CC12B752B47756Cull, 
	0x1878D850D8C05018ull, 0xD5A633C433E6C4D5ull, 0xCED1F09EF03E9ECEull, 0x4B7A29A72962A74Bull, 
	0x2D9958EE5875EE2Dull, 0x92E0764B76E44B92ull, 0x34E489B889BDB834ull, 0x061E361436301406ull, 
	0x7F9EA01FA0DF1F7Full, 0xEA65E946E90346EAull, 0xA93788D18821D1A9ull, 0x83B5EF2DEF6C2D83ull, 
	0x0B27533A53583A0Bull, 0xAA3893DB9339DBAAull, 0xD89F56EA568EEAD8ull, 0x3DC9C88EC8F58E3Dull, 
	0x77B6E82FE89F2F77ull, 0x5F3E9DDF9DC2DF5Full, 0x46434C894C0A8946ull, 0xC0E78EBA8E4EBAC0ull, 
	0x9CD6086F08946F9Cull, 0x24B419D8193DD824ull, 0x62F7555155375162ull, 0xBE7C27A32799A3BEull, 
	0x1541BD7EBDA87E15ull, 0x81BFFD21FD7C2181ull, 0xF318381038CB10F3ull, 0xE96AF24CF21B4CE9ull
};

/* prototypes for helper functions */
void HashBlock(hashState *state);
void HashPad(hashState *state);

/* initialization function */
HashReturn Init(hashState *state, int hashbitlen)
{
	/* constants for Sarmal-224 */
	static Bit64 SARMAL_224_h[8] = { 0xBB67AE8584CAA73Bull, 0x25742D7078B83B89ull, 0x25D834CC53DA4798ull, 0xC720A6486E45A6E2ull, 0x490BCFD95EF15DBDull, 0xA9930AAE12228F87ull, 0xCC4CF24DA3A1EC68ull, 0xD0CD33A01AD9A383ull };
	static Bit64 SARMAL_224_c[2] = { 0xB9E122E6138C3AE6ull, 0xDE5EDE3BD42DB730ull };
	static Bit64 SARMAL_224_s[4] = { 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull };

	/* constants for Sarmal-256 */
	static Bit64 SARMAL_256_h[8] = { 0x9E3779B97F4A7C15ull, 0xF39CC0605CEDC834ull, 0x1082276BF3A27251ull, 0xF86C6A11D0C18E95ull, 0x2767F0B153D27B7Full, 0x0347045B5BF1827Full, 0x01886F0928403002ull, 0xC1D64BA40F335E36ull };
	static Bit64 SARMAL_256_c[2] = { 0xF06AD7AE9717877Eull, 0x85839D6EFFBD7DC6ull };
	static Bit64 SARMAL_256_s[4] = { 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull };

	/* constants for Sarmal-384 */
	static Bit64 SARMAL_384_h[8] = { 0x3C6EF372FE94F82Bull, 0xE73980C0B9DB9068ull, 0x21044ED7E744E4A3ull, 0xF0D8D423A1831D2Aull, 0x4ECFE162A7A4F6FEull, 0x068E08B6B7E304FEull, 0x0310DE1250806005ull, 0x83AC97481E66BC6Dull };
	static Bit64 SARMAL_384_c[2] = { 0xE0D5AF5D2E2F0EFDull, 0x0B073ADDFF7AFB8Cull };
	static Bit64 SARMAL_384_s[4] = { 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull };

	/* constants for Sarmal-512 */
	static Bit64 SARMAL_512_h[8] = { 0x243F6A8885A308D3ull, 0x13198A2E03707344ull, 0xA4093822299F31D0ull, 0x082EFA98EC4E6C89ull, 0x452821E638D01377ull, 0xBE5466CF34E90C6Cull, 0xC0AC29B7C97C50DDull, 0x3F84D5B5B5470917ull };
	static Bit64 SARMAL_512_c[2] = { 0x9216D5D98979FB1Bull,	0xD1310BA698DFB5ACull };
	static Bit64 SARMAL_512_s[4] = { 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull, 0x0000000000000000ull };

	/* check hashbitlen and initialize accordingly */
	switch(hashbitlen)
	{
		case 224:
			memcpy(state->h, SARMAL_224_h, sizeof(SARMAL_224_h));
			memcpy(state->c, SARMAL_224_c, sizeof(SARMAL_224_c));
			memcpy(state->s, SARMAL_224_s, sizeof(SARMAL_224_s));
			
			break;

		case 256:
			memcpy(state->h, SARMAL_256_h, sizeof(SARMAL_256_h));
			memcpy(state->c, SARMAL_256_c, sizeof(SARMAL_256_c));
			memcpy(state->s, SARMAL_256_s, sizeof(SARMAL_256_s));
			
			break;

		case 384:
			memcpy(state->h, SARMAL_384_h, sizeof(SARMAL_384_h));
			memcpy(state->c, SARMAL_384_c, sizeof(SARMAL_384_c));
			memcpy(state->s, SARMAL_384_s, sizeof(SARMAL_384_s));
			
			break;

		case 512:
			memcpy(state->h, SARMAL_512_h, sizeof(SARMAL_512_h));
			memcpy(state->c, SARMAL_512_c, sizeof(SARMAL_512_c));
			memcpy(state->s, SARMAL_512_s, sizeof(SARMAL_512_s));
			
			break;

		default:
			return BAD_HASHBITLEN;
	}

	state->t = 0;
	state->hashbitlen = hashbitlen;

	state->remainingbitlen = 0;
	
	return SUCCESS;
}

/* update function */
HashReturn Update(hashState *state, const BitSequence *data, DataLength databitlen)
{
	int reqbitlen; /* number of bits required to obtain 1024-bit message block */
	int copybitlen; /* number of bits available for copying */ 

	if(state->remainingbitlen != 0)
	{	/* we have remaining data */
		reqbitlen = 1024 - state->remainingbitlen;
		copybitlen = (databitlen>=reqbitlen?reqbitlen:databitlen);
		
		/* append available bits to message block */
		memcpy(state->messageblock+(state->remainingbitlen/8), data, copybitlen/8 + (copybitlen%8?1:0));
		
		databitlen -= copybitlen;
		
		if(reqbitlen == copybitlen)
		{	/* we have 1024-bit message block, so hash it */
			HashBlock(state);
			state->remainingbitlen = 0;
			/* update data pointer */
			data += copybitlen/8 + (copybitlen%8?1:0);
		}
		else	/* update remaining bit count */
			state->remainingbitlen += copybitlen;
	}

	/* hash available data blocks */
	while(databitlen >= 1024)
	{
		memcpy(state->messageblock, data, 128);
		HashBlock(state);
		databitlen -= 1024;
		data += 128;
	}

	if(databitlen>0)
	{	/* we have remaining data, put it into message block for future processing */
		memcpy(state->messageblock, data, databitlen/8 + (databitlen%8?1:0));
		state->remainingbitlen = databitlen;
	}	

	return SUCCESS;
}

/* finalize and return hash value */
HashReturn Final(hashState *state, BitSequence *hashval)
{
	Bit64 h[8];	/* temporary space used for byte swapping */
	int i;

	/* perform padding operation */
	HashPad(state);

	/* swap bytes of chaining values */
	memcpy(h, state->h, 64);
	for(i=0; i<8; i++)
	{
		BSWAP(h[i]);
	}

	/* check hashbitlen and update return value accordingly */
	switch(state->hashbitlen)
	{
		case 224:
			hashval[0] = (BitSequence)(state->h[4] >> 24);
			hashval[1] = (BitSequence)(state->h[4] >> 16);
			hashval[2] = (BitSequence)(state->h[4] >> 8);
			hashval[3] = (BitSequence)(state->h[4]);
			
			memcpy(hashval+4, h+5, 24);

			break;
		case 256:
			memcpy(hashval, h, 32);

			break;
		case 384:
			memcpy(hashval, h, 48);

			break;
		case 512:
			memcpy(hashval, h, 64);

			break;
	}

	return SUCCESS;
}

/* all-at-once processing */
HashReturn Hash(int hashbitlen, const BitSequence *data, DataLength databitlen, BitSequence *hashval)
{
	hashState state;
	HashReturn res;
	res = Init(&state, hashbitlen); /* initialize */
	if(res != SUCCESS)
		return res;	/* init failed, return */
	res = Update(&state, data, databitlen); /* update */
	if(res != SUCCESS)
		return res;	/* update failed, return */
	return Final(&state, hashval); /* finalize and return result */
}

/* hash one block (1024 bits) */
void HashBlock(hashState *state)
{
	Bit64 m[16];	/* local message copy */

	/* state variables */
	register Bit64 h0 = state->h[0];
	register Bit64 h1 = state->h[1];
	register Bit64 h2 = state->h[2];
	register Bit64 h3 = state->h[3];
	register Bit64 h4 = state->s[0];
	register Bit64 h5 = state->s[1];
	register Bit64 h6 = state->c[0];
	register Bit64 h7 = state->t;

	/* temporary variables */
	register Bit64 t0, t1;
	
	int i;
	
	/* get 1024-bit message and swap its bytes */
	memcpy(m, state->messageblock, 128);
	for(i=0; i<16; i++)
	{
		BSWAP(m[i]);
	}

	/* check hashbitlen and process accordingly */
	switch(state->hashbitlen)
	{
		case 224:
		case 256:

			/* left branch */
			G(h0,h1,h2,h3,h4,h5,h6,h7,m[0],m[1],m[2],m[3]);
			G(h7,h0,h1,h2,h3,h4,h5,h6,m[4],m[5],m[6],m[7]);
			G(h6,h7,h0,h1,h2,h3,h4,h5,m[8],m[9],m[10],m[11]);
			G(h5,h6,h7,h0,h1,h2,h3,h4,m[12],m[13],m[14],m[15]);
	
			G(h4,h5,h6,h7,h0,h1,h2,h3,m[1],m[14],m[15],m[10]);
			G(h3,h4,h5,h6,h7,h0,h1,h2,m[12],m[2],m[7],m[4]);
			G(h2,h3,h4,h5,h6,h7,h0,h1,m[13],m[8],m[3],m[9]);
			G(h1,h2,h3,h4,h5,h6,h7,h0,m[11],m[5],m[0],m[6]);
	
			G(h0,h1,h2,h3,h4,h5,h6,h7,m[11],m[4],m[10],m[7]);
			G(h7,h0,h1,h2,h3,h4,h5,h6,m[14],m[9],m[13],m[1]);
			G(h6,h7,h0,h1,h2,h3,h4,h5,m[6],m[5],m[8],m[2]);
			G(h5,h6,h7,h0,h1,h2,h3,h4,m[3],m[15],m[12],m[0]);
	
			G(h4,h5,h6,h7,h0,h1,h2,h3,m[8],m[2],m[0],m[5]);
			G(h3,h4,h5,h6,h7,h0,h1,h2,m[10],m[3],m[14],m[13]);
			G(h2,h3,h4,h5,h6,h7,h0,h1,m[12],m[7],m[1],m[15]);
			G(h1,h2,h3,h4,h5,h6,h7,h0,m[9],m[4],m[6],m[11]);

			state->h[0] ^= h0;
			state->h[1] ^= h1;
			state->h[2] ^= h2;
			state->h[3] ^= h3;
			h0 = state->h[4];
			h1 = state->h[5];
			h2 = state->h[6];
			h3 = state->h[7];
			state->h[4] ^= h4;
			state->h[5] ^= h5;
			state->h[6] ^= h6;
			state->h[7] ^= h7;
			h4 = state->s[2];
			h5 = state->s[3];
			h6 = state->c[1];
			h7 = state->t;

			/* right branch */
			G(h0,h1,h2,h3,h4,h5,h6,h7,m[2],m[8],m[5],m[7]);
			G(h7,h0,h1,h2,h3,h4,h5,h6,m[11],m[1],m[12],m[4]);
			G(h6,h7,h0,h1,h2,h3,h4,h5,m[6],m[14],m[15],m[10]);
			G(h5,h6,h7,h0,h1,h2,h3,h4,m[0],m[13],m[9],m[3]);
									  
			G(h4,h5,h6,h7,h0,h1,h2,h3,m[13],m[14],m[2],m[1]);
			G(h3,h4,h5,h6,h7,h0,h1,h2,m[10],m[12],m[11],m[7]);
			G(h2,h3,h4,h5,h6,h7,h0,h1,m[5],m[3],m[9],m[15]);
			G(h1,h2,h3,h4,h5,h6,h7,h0,m[8],m[4],m[0],m[6]);
									  
			G(h0,h1,h2,h3,h4,h5,h6,h7,m[3],m[13],m[4],m[0]);
			G(h7,h0,h1,h2,h3,h4,h5,h6,m[5],m[6],m[2],m[10]);
			G(h6,h7,h0,h1,h2,h3,h4,h5,m[9],m[8],m[7],m[11]);
			G(h5,h6,h7,h0,h1,h2,h3,h4,m[12],m[15],m[1],m[14]);
									  
			G(h4,h5,h6,h7,h0,h1,h2,h3,m[6],m[3],m[11],m[14]);
			G(h3,h4,h5,h6,h7,h0,h1,h2,m[4],m[0],m[5],m[8]);
			G(h2,h3,h4,h5,h6,h7,h0,h1,m[7],m[13],m[2],m[12]);
			G(h1,h2,h3,h4,h5,h6,h7,h0,m[10],m[1],m[15],m[9]);
									  
			state->h[0] ^= h0;
			state->h[1] ^= h1;
			state->h[2] ^= h2;
			state->h[3] ^= h3;
			state->h[4] ^= h4;
			state->h[5] ^= h5;
			state->h[6] ^= h6;
			state->h[7] ^= h7;
			
			break;

		case 384:
		case 512:

			/* left branch */
			G(h0,h1,h2,h3,h4,h5,h6,h7,m[0],m[1],m[2],m[3]);
			G(h7,h0,h1,h2,h3,h4,h5,h6,m[4],m[5],m[6],m[7]);
			G(h6,h7,h0,h1,h2,h3,h4,h5,m[8],m[9],m[10],m[11]);
			G(h5,h6,h7,h0,h1,h2,h3,h4,m[12],m[13],m[14],m[15]);
	
			G(h4,h5,h6,h7,h0,h1,h2,h3,m[1],m[14],m[15],m[10]);
			G(h3,h4,h5,h6,h7,h0,h1,h2,m[12],m[2],m[7],m[4]);
			G(h2,h3,h4,h5,h6,h7,h0,h1,m[13],m[8],m[3],m[9]);
			G(h1,h2,h3,h4,h5,h6,h7,h0,m[11],m[5],m[0],m[6]);
	
			G(h0,h1,h2,h3,h4,h5,h6,h7,m[11],m[4],m[10],m[7]);
			G(h7,h0,h1,h2,h3,h4,h5,h6,m[14],m[9],m[13],m[1]);
			G(h6,h7,h0,h1,h2,h3,h4,h5,m[6],m[5],m[8],m[2]);
			G(h5,h6,h7,h0,h1,h2,h3,h4,m[3],m[15],m[12],m[0]);
	
			G(h4,h5,h6,h7,h0,h1,h2,h3,m[8],m[2],m[0],m[5]);
			G(h3,h4,h5,h6,h7,h0,h1,h2,m[10],m[3],m[14],m[13]);
			G(h2,h3,h4,h5,h6,h7,h0,h1,m[12],m[7],m[1],m[15]);
			G(h1,h2,h3,h4,h5,h6,h7,h0,m[9],m[4],m[6],m[11]);

			G(h0,h1,h2,h3,h4,h5,h6,h7,m[13],m[10],m[3],m[2]);
			G(h7,h0,h1,h2,h3,h4,h5,h6,m[8],m[11],m[1],m[5]);
			G(h6,h7,h0,h1,h2,h3,h4,h5,m[9],m[12],m[0],m[4]);
			G(h5,h6,h7,h0,h1,h2,h3,h4,m[15],m[6],m[7],m[14]);

			state->h[0] ^= h4;
			state->h[1] ^= h5;
			state->h[2] ^= h6;
			state->h[3] ^= h7;
			t0 = h0;
			t1 = h1;
			h0 = state->h[4];
			h1 = state->h[5];
			state->h[4] ^= t0;
			state->h[5] ^= t1;
			t0 = h2;
			t1 = h3;
			h2 = state->h[6];
			h3 = state->h[7];
			state->h[6] ^= t0;
			state->h[7] ^= t1;
			h4 = state->s[2];
			h5 = state->s[3];
			h6 = state->c[1];
			h7 = state->t;

			/* right branch */
			G(h0,h1,h2,h3,h4,h5,h6,h7,m[2],m[8],m[5],m[7]);
			G(h7,h0,h1,h2,h3,h4,h5,h6,m[11],m[1],m[12],m[4]);
			G(h6,h7,h0,h1,h2,h3,h4,h5,m[6],m[14],m[15],m[10]);
			G(h5,h6,h7,h0,h1,h2,h3,h4,m[0],m[13],m[9],m[3]);
									  
			G(h4,h5,h6,h7,h0,h1,h2,h3,m[13],m[14],m[2],m[1]);
			G(h3,h4,h5,h6,h7,h0,h1,h2,m[10],m[12],m[11],m[7]);
			G(h2,h3,h4,h5,h6,h7,h0,h1,m[5],m[3],m[9],m[15]);
			G(h1,h2,h3,h4,h5,h6,h7,h0,m[8],m[4],m[0],m[6]);
									  
			G(h0,h1,h2,h3,h4,h5,h6,h7,m[3],m[13],m[4],m[0]);
			G(h7,h0,h1,h2,h3,h4,h5,h6,m[5],m[6],m[2],m[10]);
			G(h6,h7,h0,h1,h2,h3,h4,h5,m[9],m[8],m[7],m[11]);
			G(h5,h6,h7,h0,h1,h2,h3,h4,m[12],m[15],m[1],m[14]);
									  
			G(h4,h5,h6,h7,h0,h1,h2,h3,m[6],m[3],m[11],m[14]);
			G(h3,h4,h5,h6,h7,h0,h1,h2,m[4],m[0],m[5],m[8]);
			G(h2,h3,h4,h5,h6,h7,h0,h1,m[7],m[13],m[2],m[12]);
			G(h1,h2,h3,h4,h5,h6,h7,h0,m[10],m[1],m[15],m[9]);
									  
			G(h0,h1,h2,h3,h4,h5,h6,h7,m[15],m[7],m[9],m[12]);
			G(h7,h0,h1,h2,h3,h4,h5,h6,m[3],m[13],m[10],m[0]);
			G(h6,h7,h0,h1,h2,h3,h4,h5,m[4],m[6],m[1],m[14]);
			G(h5,h6,h7,h0,h1,h2,h3,h4,m[2],m[5],m[8],m[11]);
	
			state->h[0] ^= h4;
			state->h[1] ^= h5;
			state->h[2] ^= h6;
			state->h[3] ^= h7;
			state->h[4] ^= h0;
			state->h[5] ^= h1;
			state->h[6] ^= h2;
			state->h[7] ^= h3;
			
			break;
	}
	
	/* update # of bits hashed so far */
	state->t += 1024;
}

/* perform padding operation */
void HashPad(hashState *state)
{
	/* total message length */
	Bit64 messagebitlen = state->t + state->remainingbitlen;

	int byteind = state->remainingbitlen/8; /* byte index of remaining byte */
	int bitpos = state->remainingbitlen%8; /* bit position in last byte */

	/* make unoccupied bits 0 */
	if(bitpos)
		state->messageblock[byteind] &= 0xFF<<(8-bitpos);

	if(state->remainingbitlen < 950)
	{
		/* add single 1-bit */
		if(bitpos)
		{		
			state->messageblock[byteind] |= 0x80>>(bitpos);
		}
		else
		{
			state->messageblock[byteind] = 0x80;
		}
		/* add 0-bits until we have 950 bits */
		while(byteind!=118)
		{
			byteind++;
			state->messageblock[byteind] = 0;
		}
	}
	else if(state->remainingbitlen > 950)
	{
		/* add single 1-bit */
		if(bitpos)
		{
			state->messageblock[byteind] |= 0x80>>(bitpos);
		}
		else
		{
			state->messageblock[byteind] = 0x80;
		}
		/* add 0-bits until we have 1024 bits */
		while(byteind!=127)
		{
			byteind++;
			state->messageblock[byteind] = 0;
		}
		/* hash once */
		HashBlock(state);
		/* then, start adding 0-bits until we have 950 bits */
		for(byteind=0; byteind<119; byteind++)
			state->messageblock[byteind] = 0;
	}
		
	/* append 10-bit hashbitlen to message block */
	switch(state->hashbitlen)
	{
		case 224:
			state->messageblock[119] = 0xE0;
			break;
		case 256:
			state->messageblock[118] |= 0x01;
			state->messageblock[119] = 0;
			break;
		case 384:
			state->messageblock[118] |= 0x01;
			state->messageblock[119] = 0x80;
			break;
		case 512:
			state->messageblock[118] |= 0x02;
			state->messageblock[119] = 0;
			break;
	}
	
	/* add 64-bit message length */
	BSWAP(messagebitlen);
	memcpy(state->messageblock+120, &messagebitlen, 8);
	
	/* then hash 1024-bit message block */
	HashBlock(state);
}

